diff options
author | friendica <info@friendica.com> | 2012-03-13 16:02:20 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-03-13 16:02:20 -0700 |
commit | db80ffa0ff0cf796eddede0ab439ffbd0c4e66a3 (patch) | |
tree | 4d6ca2a02a0eb65ec254f6ad2784a913c8e5d37b /mod | |
parent | 427362c324e5acfad18c72108a59a9e6e5b58550 (diff) | |
download | volse-hubzilla-db80ffa0ff0cf796eddede0ab439ffbd0c4e66a3.tar.gz volse-hubzilla-db80ffa0ff0cf796eddede0ab439ffbd0c4e66a3.tar.bz2 volse-hubzilla-db80ffa0ff0cf796eddede0ab439ffbd0c4e66a3.zip |
don't count self in number of contatcs
Diffstat (limited to 'mod')
-rwxr-xr-x | mod/contacts.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index 001bf12af..38ca570dd 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: |