aboutsummaryrefslogtreecommitdiffstats
path: root/mod/ping.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-30 21:22:52 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-30 21:22:52 -0700
commit56fc81f57e07f4208c639fee71105b66471846ef (patch)
treecc630d1be8e23effdd991168e0206130056d1889 /mod/ping.php
parentb399b20dee2752a038a64a8be2c89df142aae280 (diff)
downloadvolse-hubzilla-56fc81f57e07f4208c639fee71105b66471846ef.tar.gz
volse-hubzilla-56fc81f57e07f4208c639fee71105b66471846ef.tar.bz2
volse-hubzilla-56fc81f57e07f4208c639fee71105b66471846ef.zip
mail more or less working
Diffstat (limited to 'mod/ping.php')
-rw-r--r--mod/ping.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/mod/ping.php b/mod/ping.php
index bc160ade7..ea5c308a3 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -25,9 +25,15 @@ function ping_init(&$a) {
);
$intro = $r[0]['total'];
- // TODO
- $mail = 0;
+ $myurl = $a->get_baseurl() . '/profile/' . $user['nickname'] ;
+ $r = q("SELECT COUNT(*) AS `total` FROM `mail`
+ WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ",
+ intval($_SESSION['uid']),
+ dbesc($myurl)
+ );
+ $mail = $r[0]['total'];
+
header("Content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<result><intro>$intro</intro><mail>$mail</mail><net>$network</net><home>$home</home></result>\r\n";