|
@@ -300,7 +300,6 @@ class relation_client extends tcp_client
|
|
|
return $result['data']['invitees'];
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
public function add_follow($param)
|
|
|
{
|
|
@@ -344,28 +343,68 @@ class relation_client extends tcp_client
|
|
|
}
|
|
|
public function add_special($param)
|
|
|
{
|
|
|
- $params = array("act" => 'special','op' => 'add', "params" => $param);
|
|
|
- return $this->request($params);
|
|
|
+ $param = ["act" => 'special','op' => 'add', "params" => $param];
|
|
|
+ $result = $this->request($param);
|
|
|
+ if(empty($result)) return false;
|
|
|
+
|
|
|
+ $code = intval($result['code']);
|
|
|
+ if($code != 200) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
public function del_special($param)
|
|
|
{
|
|
|
- $param = array("act" => 'special','op' => 'del', "params" => $param);
|
|
|
- return $this->request($param);
|
|
|
+ $param = ["act" => 'special','op' => 'del', "params" => $param];
|
|
|
+ $result = $this->request($param);
|
|
|
+ if(empty($result)) return false;
|
|
|
+
|
|
|
+ $code = intval($result['code']);
|
|
|
+ if($code != 200) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public function fetch_self_special($param)
|
|
|
{
|
|
|
- $param = array("act" => 'special','op' => 'fetch_self', "params" => $param);
|
|
|
- return $this->request($param);
|
|
|
+ $param = ["act" => 'special','op' => 'fetch_self', "params" => $param];
|
|
|
+ $result = $this->request($param);
|
|
|
+ $code = intval($result['code']);
|
|
|
+ if($code != 200) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return $result['data']['specials'];
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
public function fetch_pri_special($param)
|
|
|
{
|
|
|
- $param = array("act" => 'special','op' => 'fetch_pri', "params" => $param);
|
|
|
- return $this->request($param);
|
|
|
+ $param = ["act" => 'special','op' => 'fetch_pri', "params" => $param];
|
|
|
+ $result = $this->request($param);
|
|
|
+ $code = intval($result['code']);
|
|
|
+ if($code != 200) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return $result['data']['specials'];
|
|
|
+ }
|
|
|
}
|
|
|
public function fetch_pub_special($param)
|
|
|
{
|
|
|
- $param = array("act" => 'special','op' => 'fetch_pub', "params" => $param);
|
|
|
- return $this->request($param);
|
|
|
+ $param = ["act" => 'special','op' => 'fetch_pub', "params" => $param];
|
|
|
+ $result = $this->request($param);
|
|
|
+ $code = intval($result['code']);
|
|
|
+ if($code != 200) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return $result['data']['specials'];
|
|
|
+ }
|
|
|
}
|
|
|
}
|