X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=mod%2Fping.php;h=924f9ff76bff228c0db16ff41e91c34d2c59d25c;hb=18c8f4d8b57988ce5e22c261d7ab9d73aa2a3dd5;hp=cb067f3feb04fcd55843ed857badc7062c6427c7;hpb=011e0c3f8142e3976a4d386fce066c802d4727ab;p=friendica.git
diff --git a/mod/ping.php b/mod/ping.php
index cb067f3feb..924f9ff76b 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -8,13 +8,13 @@ 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",
+ 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' ",
+ WHERE `unseen` = 1 AND `visible` = 1 AND `deleted` = 0 AND `uid` = %d AND `wall` = 1 ",
intval(local_user())
);
$home = $r[0]['total'];
@@ -25,26 +25,24 @@ function ping_init(&$a) {
);
$intro = $r[0]['total'];
- if ($a->config['register_policy'] == REGISTER_APPROVE &&
- $a->config['admin_email'] === $a->user['email']){
- $r = q("SELECT COUNT(*) AS `total` FROM `register`");
- $register = $r[0]['total'];
- } else {
- $register = "0";
- }
-
-
$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(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$register$intro$mail$network$home\r\n";
+ echo "\r\n$intro$mail$network$home$register\r\n";
killme();
}