From 44d945cd08f425f310e7d24d2769e5185cb86988 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 18 Sep 2016 17:35:11 -0700 Subject: couple of minor issues with dba namespace during install and enotify::format referencing an unknown variable --- Zotlabs/Lib/Enotify.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'Zotlabs/Lib/Enotify.php') diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index 56c717468..683e91b52 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -116,10 +116,13 @@ class Enotify { $itemlink = $params['link']; - // ignore like/unlike activity on posts - they probably require a sepearate notification preference + // ignore like/unlike activity on posts - they probably require a separate notification preference - if (array_key_exists('item',$params) && (! visible_activity($params['item']))) + if (array_key_exists('item',$params) && (! visible_activity($params['item']))) { + logger('notification: not a visible activity. Ignoring.'); + pop_lang(); return; + } $parent_mid = $params['parent_mid']; @@ -386,8 +389,11 @@ class Enotify { // Mark some notifications as seen right away // Note! The notification have to be created, because they are used to send emails // So easiest solution to hide them from Notices is to mark them as seen right away. - // Another option would be to not add them to the DB, and change how emails are handled (probably would be better that way) + // Another option would be to not add them to the DB, and change how emails are handled + // (probably would be better that way) + $always_show_in_notices = get_pconfig($recip['channel_id'],'system','always_show_in_notices'); + if (!$always_show_in_notices) { if (($params['type'] == NOTIFY_WALL) || ($params['type'] == NOTIFY_MAIL) || ($params['type'] == NOTIFY_INTRO)) { $seen = 1; @@ -654,12 +660,12 @@ class Enotify { require_once('include/conversation.php'); - // Call localize_item with the "brief" flag to get a one line status for activities. + // Call localize_item to get a one line status for activities. // This should set $item['localized'] to indicate we have a brief summary. localize_item($item); - if($item_localize) { + if($item['localize']) { $itemem_text = $item['localize']; } else { -- cgit v1.2.3