]> git.mxchange.org Git - friendica.git/blobdiff - mod/poco.php
Merge https://github.com/friendica/friendica into pull
[friendica.git] / mod / poco.php
index 79cf820bcd9b15c1d040d46e3a90406ed2c01530..cb9abb340ddb06fe071e32f06fc9de4cb85f4e68 100644 (file)
@@ -45,6 +45,8 @@ function poco_init(&$a) {
 
        if($justme)
                $sql_extra = " and `contact`.`self` = 1 ";
+       else
+               $sql_extra = " and `contact`.`self` = 0 ";
 
        if($cid)
                $sql_extra = sprintf(" and `contact`.`id` = %d ",intval($cid));
@@ -54,7 +56,7 @@ function poco_init(&$a) {
                        and uid in (select uid from pconfig where cat = 'system' and k = 'suggestme' and v = 1) ");
        }
        else {
-               $r = q("SELECT count(*) as `total` from `contact` where `uid` = %d and blocked = 0 and pending = 0 and hidden = 0
+               $r = q("SELECT count(*) as `total` from `contact` where `uid` = %d and blocked = 0 and pending = 0 and hidden = 0 and archive = 0
                        $sql_extra ",
                        intval($user['uid'])
                );
@@ -79,7 +81,7 @@ function poco_init(&$a) {
        }
        else {
 
-               $r = q("SELECT * from `contact` where `uid` = %d and blocked = 0 and pending = 0 and hidden = 0
+               $r = q("SELECT * from `contact` where `uid` = %d and blocked = 0 and pending = 0 and hidden = 0 and archive = 0
                        $sql_extra LIMIT %d, %d",
                        intval($user['uid']),
                        intval($startIndex),