X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=mod%2Fping.php;h=924f9ff76bff228c0db16ff41e91c34d2c59d25c;hb=f8da48a880f8b01e2284610e74fe3b2b6ec2dc39;hp=9f7191758e02b1816a8e92f3bb1da39c2cefcf53;hpb=ffb1997902facb36b78a7cfa522f41f2b3d71cda;p=friendica.git
diff --git a/mod/ping.php b/mod/ping.php
index 9f7191758e..924f9ff76b 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -8,34 +8,41 @@ function ping_init(&$a) {
xml_status(0);
$r = q("SELECT COUNT(*) AS `total` FROM `item`
- WHERE `unseen` = 1 AND `visible` = 1 AND `deleted` = 0 AND `uid` = %d",
- intval(get_uid())
+ WHERE `unseen` = 1 AND `visible` = 1 AND `deleted` = 0 AND `uid` = %d AND `wall` = 0 ",
+ intval(local_user())
);
$network = $r[0]['total'];
$r = q("SELECT COUNT(*) AS `total` FROM `item`
- WHERE `unseen` = 1 AND `visible` = 1 AND `deleted` = 0 AND `uid` = %d AND `type` != 'remote' ",
- intval(get_uid())
+ WHERE `unseen` = 1 AND `visible` = 1 AND `deleted` = 0 AND `uid` = %d AND `wall` = 1 ",
+ intval(local_user())
);
$home = $r[0]['total'];
$r = q("SELECT COUNT(*) AS `total` FROM `intro`
WHERE `uid` = %d AND `blocked` = 0 AND `ignore` = 0 ",
- intval(get_uid())
+ intval(local_user())
);
$intro = $r[0]['total'];
- $myurl = $a->get_baseurl() . '/profile/' . $user['nickname'] ;
+ $myurl = $a->get_baseurl() . '/profile/' . $a->user['nickname'] ;
$r = q("SELECT COUNT(*) AS `total` FROM `mail`
WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ",
- intval(get_uid()),
+ intval(local_user()),
dbesc($myurl)
);
-
$mail = $r[0]['total'];
+
+ if ($a->config['register_policy'] == REGISTER_APPROVE && is_site_admin()){
+ $r = q("SELECT COUNT(*) AS `total` FROM `register`");
+ $register = $r[0]['total'];
+ } else {
+ $register = "0";
+ }
+
header("Content-type: text/xml");
- echo "\r\n$intro$mail$network$home\r\n";
+ echo "\r\n$intro$mail$network$home$register\r\n";
killme();
}