sysnotify count in wrong location, and wrong number
This commit is contained in:
parent
4839c235da
commit
c90bac5727
2 changed files with 11 additions and 3 deletions
10
mod/ping.php
10
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);
|
$tot = $mail+$intro+$register+count($comments)+count($likes)+count($dislikes)+count($friends)+count($posts)+count($tags);
|
||||||
|
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
$sysnotify = 0;
|
||||||
|
|
||||||
if($firehose) {
|
if($firehose) {
|
||||||
echo ' <notif count="'.$tot.'">';
|
echo ' <notif count="'.$tot.'">';
|
||||||
}
|
}
|
||||||
else {
|
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)) {
|
if(count($z)) {
|
||||||
foreach($z as $zz) {
|
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'])));
|
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'])));
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
{{ if $nav.notifications }}
|
{{ if $nav.notifications }}
|
||||||
<li id="nav-notifications-linkmenu" class="nav-commlink"><a href="$nav.notifications.0" rel="#nav-notifications-menu" title="$nav.notifications.1">$nav.notifications.1</a>
|
<li id="nav-notifications-linkmenu" class="nav-commlink"><a href="$nav.notifications.0" rel="#nav-notifications-menu" title="$nav.notifications.1">$nav.notifications.1</a>
|
||||||
<span id="notify-update" class="nav-notify"></span>
|
<span id="notify-update" class="nav-ajax-left"></span>
|
||||||
<ul id="nav-notifications-menu" class="menu-popup">
|
<ul id="nav-notifications-menu" class="menu-popup">
|
||||||
<li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">$nav.notifications.mark.1</a></li>
|
<li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">$nav.notifications.mark.1</a></li>
|
||||||
<li id="nav-notifications-see-all"><a href="$nav.notifications.all.0">$nav.notifications.all.1</a></li>
|
<li id="nav-notifications-see-all"><a href="$nav.notifications.all.0">$nav.notifications.all.1</a></li>
|
||||||
|
|
Loading…
Reference in a new issue