]> git.mxchange.org Git - friendica.git/commitdiff
Fix registration request notification query
authorHypolite Petovan <ben.lort@gmail.com>
Sat, 24 Sep 2016 17:49:55 +0000 (13:49 -0400)
committerHypolite Petovan <ben.lort@gmail.com>
Sat, 24 Sep 2016 17:49:55 +0000 (13:49 -0400)
- Removed wrong usage of COUNT in registration request query
- Added simple count() of results

mod/ping.php

index 8c28e7474422bc6f7808a78fcae29b66fd504833..da44bc52dfa2a6e838bb9bda7c05e709d3f0c751 100644 (file)
@@ -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";
                }