Fix registration request notification query
- Removed wrong usage of COUNT in registration request query - Added simple count() of results
This commit is contained in:
parent
de326c6d11
commit
fac2d9a880
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user