diff options
author | Paolo T <tuscanhobbit@users.noreply.github.com> | 2013-10-11 00:24:25 -0700 |
---|---|---|
committer | Paolo T <tuscanhobbit@users.noreply.github.com> | 2013-10-11 00:24:25 -0700 |
commit | 7a63d5e50b0ae16a38e673867abd6043d4becc07 (patch) | |
tree | 6d174d12a0de707ed8f875801a8dbc0c35f70d3f /include/enotify.php | |
parent | c2a88c3e4858e3eb2c553bdc775d2f684b0d46b4 (diff) | |
parent | 89fc319c900873be58fa677707518646f6c79eec (diff) | |
download | volse-hubzilla-7a63d5e50b0ae16a38e673867abd6043d4becc07.tar.gz volse-hubzilla-7a63d5e50b0ae16a38e673867abd6043d4becc07.tar.bz2 volse-hubzilla-7a63d5e50b0ae16a38e673867abd6043d4becc07.zip |
Merge pull request #2 from friendica/master
Upgraded to latest red
Diffstat (limited to 'include/enotify.php')
-rw-r--r-- | include/enotify.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/enotify.php b/include/enotify.php index a15e42b73..147023f41 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -51,9 +51,9 @@ function notification($params) { $additional_mail_header = ""; if(array_key_exists('item',$params)) { + require_once('include/conversation.php'); // if it's a normal item... if(array_key_exists('verb',$params['item'])) { - require_once('include/conversation.php'); // localize_item() alters the original item so make a copy first $i = $params['item']; logger('calling localize'); @@ -89,6 +89,11 @@ function notification($params) { if($params['type'] == NOTIFY_COMMENT) { // logger("notification: params = " . print_r($params, true), LOGGER_DEBUG); + // ignore like/unlike activity on posts - they probably require a sepearate notification preference + + if(array_key_exists('item',$params) && (! visible_activity($params['item']))) + return; + $parent_id = $params['parent']; // Check to see if there was already a notify for this post. @@ -379,11 +384,9 @@ function notification($params) { logger('notification: sending notification email'); - $textversion = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r", "\\n"), "\n", - $body))),ENT_QUOTES,'UTF-8')); + $textversion = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(array("\\r", "\\n"), array( "", "\n"), $body))),ENT_QUOTES,'UTF-8')); - $htmlversion = html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r","\\n\\n" ,"\\n"), - "<br />\n",$body))), ENT_QUOTES,'UTF-8'); + $htmlversion = html_entity_decode(bbcode(stripslashes(str_replace(array("\\r","\\n"), array("","<br />\n"),$body))), ENT_QUOTES,'UTF-8'); // use $_SESSION['zid_override'] to force zid() to use |