diff options
author | friendica <info@friendica.com> | 2012-02-25 04:37:12 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-02-25 04:37:12 -0800 |
commit | c90bac57271625d06d92dfb2b7499d0787c55e3c (patch) | |
tree | 3ce2356a9776c32f0b88e40c89df639a78b00545 /mod/ping.php | |
parent | 4839c235da1ce6ed61c71d0a9d28df14c01b567b (diff) | |
download | volse-hubzilla-c90bac57271625d06d92dfb2b7499d0787c55e3c.tar.gz volse-hubzilla-c90bac57271625d06d92dfb2b7499d0787c55e3c.tar.bz2 volse-hubzilla-c90bac57271625d06d92dfb2b7499d0787c55e3c.zip |
sysnotify count in wrong location, and wrong number
Diffstat (limited to 'mod/ping.php')
-rw-r--r-- | mod/ping.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mod/ping.php b/mod/ping.php index c0e61434e..0f6f0a9d6 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -127,12 +127,20 @@ function ping_init(&$a) { $tot = $mail+$intro+$register+count($comments)+count($likes)+count($dislikes)+count($friends)+count($posts)+count($tags); require_once('include/bbcode.php'); - + $sysnotify = 0; + if($firehose) { echo ' <notif count="'.$tot.'">'; } else { - echo ' <notif count="'. count($z) .'">'; + if(count($z)) { + foreach($z as $zz) { + if($zz['seen'] == 0) + $sysnotify ++; + } + } + + echo ' <notif count="'. $sysnotify .'">'; if(count($z)) { foreach($z as $zz) { echo xmlize($a->get_baseurl() . '/notify/view/' . $zz['id'], $zz['name'],$zz['url'],$zz['photo'],relative_date($zz['date']), ($zz['seen'] ? 'notify-seen' : 'notify-unseen'), ($zz['seen'] ? '' : '→ ') .strip_tags(bbcode($zz['msg']))); |