From: Hypolite Petovan Date: Sat, 24 Sep 2016 17:49:55 +0000 (-0400) Subject: Fix registration request notification query X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fac2d9a880a1e10a613bbbc7bddd7e461c5d9dbf;p=friendica.git Fix registration request notification query - Removed wrong usage of COUNT in registration request query - Added simple count() of results --- diff --git a/mod/ping.php b/mod/ping.php index 8c28e74744..da44bc52df 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -123,9 +123,8 @@ function ping_init(&$a) { $mail = count($mails); if ($a->config['register_policy'] == REGISTER_APPROVE && is_site_admin()){ - $regs = q("SELECT `contact`.`name`, `contact`.`url`, `contact`.`micro`, `register`.`created`, COUNT(*) as `total` FROM `contact` RIGHT JOIN `register` ON `register`.`uid`=`contact`.`uid` WHERE `contact`.`self`=1"); - if ($regs) - $register = $regs[0]['total']; + $regs = q("SELECT `contact`.`name`, `contact`.`url`, `contact`.`micro`, `register`.`created` FROM `contact` RIGHT JOIN `register` ON `register`.`uid`=`contact`.`uid` WHERE `contact`.`self`=1"); + $register = count($regs); } else { $register = "0"; }