X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnotifications.php;h=b8029fd03fa928eb27ea8942a6fd629d9dfa00a6;hb=5635fe250ca4ef8e1dcf12cfe0f49b2a23c86b16;hp=b28b1478d49a8ab0cc007a598fa0e41df13af7a5;hpb=8a80ea24d1d8039be6dc532c9db23c60e71eb467;p=friendica.git diff --git a/mod/notifications.php b/mod/notifications.php index b28b1478d4..b8029fd03f 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -69,6 +69,9 @@ function notifications_content(&$a) { nav_set_selected('notifications'); + $json = (($a->argc > 1 && $a->argv[$a->argc - 1] === 'json') ? true : false); + + $o = ''; $tabs = array( array( @@ -211,7 +214,7 @@ function notifications_content(&$a) { } else info( t('No introductions.') . EOL); - + $o .= replace_macros($notif_tpl,array( '$notif_header' => t('Notifications'), '$tabs' => $tabs, @@ -229,7 +232,7 @@ function notifications_content(&$a) { `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` as `object`, `pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink` FROM `item` INNER JOIN `item` as `pitem` ON `pitem`.`id`=`item`.`parent` - WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND + WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND `pitem`.`parent` != 0 `item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`wall` = 0 ORDER BY `item`.`created` DESC" , intval(local_user()) ); @@ -242,7 +245,7 @@ function notifications_content(&$a) { $notif_content = ''; - if (count($r) > 0) { + if ($r) { foreach ($r as $it) { switch($it['verb']){