|
@@ -90,14 +90,14 @@ class mem_relation
|
|
|
private function subscrib_me($member_id)
|
|
|
{
|
|
|
$ret = algorithm_helper::bsearch($member_id,$this->subscriber);
|
|
|
- if($ret == false) {
|
|
|
+ if($ret == -1) {
|
|
|
array_push($this->subscriber,$member_id);
|
|
|
sort($this->subscriber);
|
|
|
$this->dirty = true;
|
|
|
}
|
|
|
|
|
|
$ret = algorithm_helper::bsearch($member_id,$this->new_subscriber);
|
|
|
- if($ret == false) {
|
|
|
+ if($ret == -1) {
|
|
|
array_push($this->new_subscriber,$member_id);
|
|
|
sort($this->new_subscriber);
|
|
|
$this->dirty = true;
|
|
@@ -131,10 +131,10 @@ class mem_relation
|
|
|
}
|
|
|
private function subscribed($mobile)
|
|
|
{
|
|
|
- if(algorithm_helper::bsearch($mobile,$this->build_mobiles) != false) {
|
|
|
+ if(algorithm_helper::bsearch($mobile,$this->build_mobiles) != -1) {
|
|
|
return true;
|
|
|
}
|
|
|
- if(algorithm_helper::bsearch($mobile,$this->unbuild_mobiles) != false) {
|
|
|
+ if(algorithm_helper::bsearch($mobile,$this->unbuild_mobiles) != -1) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
@@ -142,7 +142,7 @@ class mem_relation
|
|
|
|
|
|
public function add_fllower($someone_id)
|
|
|
{
|
|
|
- if(algorithm_helper::bsearch($someone_id,$this->follower) != false) {
|
|
|
+ if(algorithm_helper::bsearch($someone_id,$this->follower) != -1) {
|
|
|
array_push($this->follower,$someone_id);
|
|
|
sort($this->follower);
|
|
|
$this->dirty = true;
|
|
@@ -152,7 +152,7 @@ class mem_relation
|
|
|
private function add_unbuild($mobile)
|
|
|
{
|
|
|
$ret = algorithm_helper::bsearch($mobile,$this->unbuild_mobiles);
|
|
|
- if($ret == false) {
|
|
|
+ if($ret == -1) {
|
|
|
array_push($this->unbuild_mobiles,$mobile);
|
|
|
sort($this->unbuild_mobiles);
|
|
|
$this->dirty = true;
|
|
@@ -162,7 +162,7 @@ class mem_relation
|
|
|
private function remove_unbuild($mobile)
|
|
|
{
|
|
|
$ret = algorithm_helper::bsearch($mobile,$this->unbuild_mobiles);
|
|
|
- if($ret != false) {
|
|
|
+ if($ret != -1) {
|
|
|
unset($this->unbuild_mobiles[$ret]);
|
|
|
$this->dirty = true;
|
|
|
}
|
|
@@ -171,7 +171,7 @@ class mem_relation
|
|
|
private function add_build($mobile)
|
|
|
{
|
|
|
$ret = algorithm_helper::bsearch($mobile,$this->build_mobiles);
|
|
|
- if($ret == false) {
|
|
|
+ if($ret == -1) {
|
|
|
array_push($this->build_mobiles,$mobile);
|
|
|
sort($this->build_mobiles);
|
|
|
$this->dirty = true;
|