@@ -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,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 | // Send alerts as soon as changes are made, and only once. |
193 | 193 | $this->send_alerts = empty($this->_details['respawns']); |
@@ -500,8 +500,7 @@ discard block |
||
500 | 500 | if (!empty($member_data['id_topic']) && $type != 'topic' && !empty($this->prefs[$member_id])) |
501 | 501 | { |
502 | 502 | $pref = !empty($this->prefs[$member_id]['topic_notify_' . $topicOptions['id']]) ? |
503 | - $this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] : |
|
504 | - (!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0); |
|
503 | + $this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] : (!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0); |
|
505 | 504 | |
506 | 505 | $message_type = 'notification_' . $type; |
507 | 506 | |
@@ -520,8 +519,7 @@ discard block |
||
520 | 519 | elseif ($type == 'topic') |
521 | 520 | { |
522 | 521 | $pref = !empty($this->prefs[$member_id]['board_notify_' . $topicOptions['board']]) ? |
523 | - $this->prefs[$member_id]['board_notify_' . $topicOptions['board']] : |
|
524 | - (!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0); |
|
522 | + $this->prefs[$member_id]['board_notify_' . $topicOptions['board']] : (!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0); |
|
525 | 523 | |
526 | 524 | $content_type = 'board'; |
527 | 525 |
@@ -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 |