From db80ffa0ff0cf796eddede0ab439ffbd0c4e66a3 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Mar 2012 16:02:20 -0700 Subject: [PATCH] don't count self in number of contatcs --- mod/contacts.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index 001bf12af4..38ca570ddf 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -445,7 +445,7 @@ function contacts_content(&$a) { $r = q("SELECT COUNT(*) AS `total` FROM `contact` - WHERE `uid` = %d AND `pending` = 0 $sql_extra $sql_extra2 ", + WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ", intval($_SESSION['uid'])); if(count($r)) { $a->set_pager_total($r[0]['total']); @@ -454,7 +454,7 @@ function contacts_content(&$a) { - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `pending` = 0 $sql_extra $sql_extra2 ORDER BY `name` ASC LIMIT %d , %d ", + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ORDER BY `name` ASC LIMIT %d , %d ", intval($_SESSION['uid']), intval($a->pager['start']), intval($a->pager['itemspage']) @@ -465,8 +465,6 @@ function contacts_content(&$a) { if(count($r)) { foreach($r as $rr) { - if($rr['self']) - continue; switch($rr['rel']) { case CONTACT_IS_FRIEND: