]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #3927 from rabuzarus/20171121_-_fix_reg_notifs
authorHypolite Petovan <mrpetovan@gmail.com>
Tue, 21 Nov 2017 04:54:11 +0000 (23:54 -0500)
committerGitHub <noreply@github.com>
Tue, 21 Nov 2017 04:54:11 +0000 (23:54 -0500)
Bugfix: show no registrations notifs if there are none

mod/ping.php

index 3ab316d45cb9d4c6bc3830fa60816fe168c7ae6f..c6f67d397d3b25730be37c54f1a03e5f188b3b5c 100644 (file)
@@ -202,13 +202,13 @@ function ping_init(App $a)
 
                if ($a->config['register_policy'] == REGISTER_APPROVE && is_site_admin()) {
                        $regs = q(
-                               "SELECT `contact`.`name`, `contact`.`url`, `contact`.`micro`, `register`.`created`, COUNT(*) AS `total`
+                               "SELECT `contact`.`name`, `contact`.`url`, `contact`.`micro`, `register`.`created`
                                FROM `contact` RIGHT JOIN `register` ON `register`.`uid` = `contact`.`uid`
                                WHERE `contact`.`self` = 1"
                        );
 
                        if (DBM::is_result($regs)) {
-                               $register_count = $regs[0]['total'];
+                               $register_count = count($regs);
                        }
                }