]> git.mxchange.org Git - friendica.git/commitdiff
Need the count conditions to match.
authormiqrogroove <miqrogroove@gmail.com>
Wed, 20 Jun 2018 15:59:13 +0000 (11:59 -0400)
committerGitHub <noreply@github.com>
Wed, 20 Jun 2018 15:59:13 +0000 (11:59 -0400)
mod/directory.php

index 04deecbeded25fdde35023366a311b9648d43044..a83b1b76ceb6f9aebb60598d2acdf4528227cd95 100644 (file)
@@ -83,7 +83,7 @@ function directory_content(App $a)
 
        $cnt = dba::fetch_first("SELECT COUNT(*) AS `total` FROM `profile`
                                LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
-                               WHERE `is-default` $publish AND NOT `user`.`blocked` $sql_extra");
+                               WHERE `is-default` $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` $sql_extra");
        if (DBM::is_result($cnt)) {
                $a->set_pager_total($cnt['total']);
        }
@@ -96,7 +96,7 @@ function directory_content(App $a)
                        `contact`.`addr`, `contact`.`url` AS profile_url FROM `profile`
                        LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
                        LEFT JOIN `contact` ON `contact`.`uid` = `user`.`uid`
-                       WHERE `is-default` $publish AND `user`.`blocked` = 0 AND `user`.`account_removed` = 0 AND `contact`.`self`
+                       WHERE `is-default` $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` AND `contact`.`self`
                        $sql_extra $order LIMIT $limit"
        );
        if (DBM::is_result($r)) {