mirror of
https://github.com/friendica/friendica
synced 2024-12-23 09:20:17 +00:00
don't count self in number of contatcs
This commit is contained in:
parent
427362c324
commit
db80ffa0ff
1 changed files with 2 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue