@@ -251,7 +251,7 @@ |
||
| 251 | 251 | return array(); |
| 252 | 252 | |
| 253 | 253 | // preparse code does a few things which might mess with our parsing |
| 254 | - $body = htmlspecialchars_decode(preg_replace('~<br\s*/?'.'>~', "\n", str_replace(' ', ' ', $body)), ENT_QUOTES); |
|
| 254 | + $body = htmlspecialchars_decode(preg_replace('~<br\s*/?' . '>~', "\n", str_replace(' ', ' ', $body)), ENT_QUOTES); |
|
| 255 | 255 | |
| 256 | 256 | // Remove quotes, we don't want to get double mentions. |
| 257 | 257 | $body = preg_replace('~\[quote[^\]]*\](?' . '>(?' . '>[^\[]|\[(?!/?quote[^\]]*\]))|(?0))*\[/quote\]~', '', $body); |
@@ -174,7 +174,8 @@ |
||
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - $unnotified = array_filter($this->members['watching'], function ($member) { |
|
| 177 | + $unnotified = array_filter($this->members['watching'], function ($member) |
|
| 178 | + { |
|
| 178 | 179 | return empty($member['sent']); |
| 179 | 180 | }); |
| 180 | 181 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - $unnotified = array_filter($this->members['watching'], function ($member) { |
|
| 177 | + $unnotified = array_filter($this->members['watching'], function($member) { |
|
| 178 | 178 | return empty($member['sent']); |
| 179 | 179 | }); |
| 180 | 180 | |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | $this->members['mentioned'] = array_intersect_key($this->members['mentioned'], $unnotified); |
| 188 | 188 | |
| 189 | 189 | // Notifications about modified posts only go to members who were mentioned or quoted |
| 190 | - $this->members['watching'] = $type == 'edit' ? array(): $unnotified; |
|
| 190 | + $this->members['watching'] = $type == 'edit' ? array() : $unnotified; |
|
| 191 | 191 | |
| 192 | 192 | // If this post has no quotes or mentions, just delete any obsolete alerts and bail out. |
| 193 | 193 | if (empty($this->members['quoted']) && empty($this->members['mentioned'])) |
@@ -497,8 +497,7 @@ discard block |
||
| 497 | 497 | if (!empty($member_data['id_topic']) && $type != 'topic' && !empty($this->prefs[$member_id])) |
| 498 | 498 | { |
| 499 | 499 | $pref = !empty($this->prefs[$member_id]['topic_notify_' . $topicOptions['id']]) ? |
| 500 | - $this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] : |
|
| 501 | - (!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0); |
|
| 500 | + $this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] : (!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0); |
|
| 502 | 501 | |
| 503 | 502 | $message_type = 'notification_' . $type; |
| 504 | 503 | |
@@ -517,8 +516,7 @@ discard block |
||
| 517 | 516 | elseif ($type == 'topic') |
| 518 | 517 | { |
| 519 | 518 | $pref = !empty($this->prefs[$member_id]['board_notify_' . $topicOptions['board']]) ? |
| 520 | - $this->prefs[$member_id]['board_notify_' . $topicOptions['board']] : |
|
| 521 | - (!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0); |
|
| 519 | + $this->prefs[$member_id]['board_notify_' . $topicOptions['board']] : (!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0); |
|
| 522 | 520 | |
| 523 | 521 | $content_type = 'board'; |
| 524 | 522 | |