|
@@ -66,10 +66,8 @@ class member_ugcControl extends specialControl
|
|
$result = search\relation_client::instance()->fetch_pri_special(['user_id' => intval($_SESSION['member_id']),
|
|
$result = search\relation_client::instance()->fetch_pri_special(['user_id' => intval($_SESSION['member_id']),
|
|
'special_id' => $special_id,'count'=> $count,'type' => $direct]);
|
|
'special_id' => $special_id,'count'=> $count,'type' => $direct]);
|
|
}
|
|
}
|
|
- elseif($type == "mine_list")
|
|
|
|
- {
|
|
|
|
- $result = search\relation_client::instance()->fetch_self_special(['user_id' => intval($_SESSION['member_id']),
|
|
|
|
- 'special_id' => $special_id,'count'=> $count,'type' => $direct]);
|
|
|
|
|
|
+ elseif($type == "mine_list") {
|
|
|
|
+ $result = $this->mine_specials($special_id,$count);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
return self::outerr(errcode::ErrParamter);
|
|
return self::outerr(errcode::ErrParamter);
|
|
@@ -112,6 +110,27 @@ class member_ugcControl extends specialControl
|
|
'mobile_page' => mobile_page($page_no)]);
|
|
'mobile_page' => mobile_page($page_no)]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private function mine_specials($special_id,$count)
|
|
|
|
+ {
|
|
|
|
+ $mod_special = Model();
|
|
|
|
+ if($special_id == -1) {
|
|
|
|
+ $items = $mod_special->table('mb_special')->field('special_id')->order('special_id desc')->limit($count)->select();
|
|
|
|
+ } else {
|
|
|
|
+ $items = $mod_special->table('mb_special')->field('special_id')->where(array('special_id' => ['lt',$special_id]))->limit($count)->select();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $result = [];
|
|
|
|
+ $result['code'] = 200;
|
|
|
|
+ $result['data'] = [];
|
|
|
|
+ $result['data']['specials'] = [];
|
|
|
|
+ foreach ($items as $item) {
|
|
|
|
+ $spid = intval($item['special_id']);
|
|
|
|
+ $result['data']['specials'][] = $spid;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return $result;
|
|
|
|
+ }
|
|
private function tip_block($type)
|
|
private function tip_block($type)
|
|
{
|
|
{
|
|
if($type == "pub_list") {
|
|
if($type == "pub_list") {
|
|
@@ -134,7 +153,6 @@ class member_ugcControl extends specialControl
|
|
return $spid;
|
|
return $spid;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
private function direct()
|
|
private function direct()
|
|
{
|
|
{
|
|
$cur_page = $this->page_no();
|
|
$cur_page = $this->page_no();
|
|
@@ -157,7 +175,6 @@ class member_ugcControl extends specialControl
|
|
return empty($specials) ? false : $specials;
|
|
return empty($specials) ? false : $specials;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
private function special_list($spids, &$ugcs)
|
|
private function special_list($spids, &$ugcs)
|
|
{
|
|
{
|
|
$result = [];
|
|
$result = [];
|
|
@@ -458,10 +475,6 @@ class member_ugcControl extends specialControl
|
|
if(empty($comment)) {
|
|
if(empty($comment)) {
|
|
return self::outerr(errcode::ErrParamter,"评论内容不能为空.");
|
|
return self::outerr(errcode::ErrParamter,"评论内容不能为空.");
|
|
}
|
|
}
|
|
- $len1 = mb_strlen($comment,'UTF-8');
|
|
|
|
- $len = iconv_strlen($comment,'UTF-16LE');
|
|
|
|
- $x = iconv_substr($comment,0,$len);
|
|
|
|
- //$comment = iconv('utf-16', 'utf-8', $comment);
|
|
|
|
$comment = text_filter::filter_html($comment);
|
|
$comment = text_filter::filter_html($comment);
|
|
if(empty($comment)) {
|
|
if(empty($comment)) {
|
|
return self::outerr(errcode::ErrParamter,"评论内容不能含非法字符.");
|
|
return self::outerr(errcode::ErrParamter,"评论内容不能含非法字符.");
|