aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-04-16 12:41:31 +0000
committerMario <mario@mariovavti.com>2021-04-16 12:41:31 +0000
commitb8a5f5fbf2b1702642c9489ea5ae3360c5b731bb (patch)
tree48fa7efe84d3b1059de885b9e61f1250aa97065e /Zotlabs/Module
parent7ccd7b439f5a029384ecb28911a0df6f6d658231 (diff)
downloadvolse-hubzilla-b8a5f5fbf2b1702642c9489ea5ae3360c5b731bb.tar.gz
volse-hubzilla-b8a5f5fbf2b1702642c9489ea5ae3360c5b731bb.tar.bz2
volse-hubzilla-b8a5f5fbf2b1702642c9489ea5ae3360c5b731bb.zip
fix regression in mod notifications
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Notifications.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/Zotlabs/Module/Notifications.php b/Zotlabs/Module/Notifications.php
index 55268e0a2..8ecf5760a 100644
--- a/Zotlabs/Module/Notifications.php
+++ b/Zotlabs/Module/Notifications.php
@@ -6,15 +6,17 @@ require_once('include/bbcode.php');
class Notifications extends \Zotlabs\Web\Controller {
function get() {
-
+
if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
-
+
nav_set_selected('Notifications');
-
+
$o = '';
+ $notif_content = '';
+ $notifications_available = false;
$r = q("select count(*) as total from notify where uid = %d and seen = 0",
intval(local_channel())
@@ -24,7 +26,8 @@ class Notifications extends \Zotlabs\Web\Controller {
and seen = 0 order by created desc limit 50",
intval(local_channel())
);
- } else {
+ }
+ else {
$r1 = q("select * from notify where uid = %d
and seen = 0 order by created desc limit 50",
intval(local_channel())
@@ -36,12 +39,12 @@ class Notifications extends \Zotlabs\Web\Controller {
);
$r = array_merge($r1,$r2);
}
-
+
if($r) {
- $notifications_available = 1;
+ $notifications_available = true;
foreach ($r as $rr) {
$x = strip_tags(bbcode($rr['msg']));
- $notif_content = replace_macros(get_markup_template('notify.tpl'),array(
+ $notif_content .= replace_macros(get_markup_template('notify.tpl'),array(
'$item_link' => z_root().'/notify/view/'. $rr['id'],
'$item_image' => $rr['photo'],
'$item_text' => $x,
@@ -54,15 +57,15 @@ class Notifications extends \Zotlabs\Web\Controller {
else {
$notif_content = t('No more system notifications.');
}
-
+
$o .= replace_macros(get_markup_template('notifications.tpl'),array(
'$notif_header' => t('System Notifications'),
'$notif_link_mark_seen' => t('Mark all seen'),
'$notif_content' => $notif_content,
'$notifications_available' => $notifications_available,
));
-
+
return $o;
}
-
+
}