diff options
author | Cesar G <prototech91@gmail.com> | 2014-01-16 17:27:30 -0800 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2014-01-16 17:27:30 -0800 |
commit | 4bb05c74e5651bab98ce3a38e2b65f79d9ccfb11 (patch) | |
tree | 2b6c8c63ecd4f7de3a814d95217c76a0334db4a0 /phpBB/phpbb/notification/type/topic.php | |
parent | 670a9a1aea49ac4b39966025be9fd28062567fa2 (diff) | |
download | forums-4bb05c74e5651bab98ce3a38e2b65f79d9ccfb11.tar forums-4bb05c74e5651bab98ce3a38e2b65f79d9ccfb11.tar.gz forums-4bb05c74e5651bab98ce3a38e2b65f79d9ccfb11.tar.bz2 forums-4bb05c74e5651bab98ce3a38e2b65f79d9ccfb11.tar.xz forums-4bb05c74e5651bab98ce3a38e2b65f79d9ccfb11.zip |
[ticket/12032] Do not inherit read status in certain notifications.
PHPBB3-12032
Diffstat (limited to 'phpBB/phpbb/notification/type/topic.php')
-rw-r--r-- | phpBB/phpbb/notification/type/topic.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/phpbb/notification/type/topic.php b/phpBB/phpbb/notification/type/topic.php index 6198881d8d..98f086a50b 100644 --- a/phpBB/phpbb/notification/type/topic.php +++ b/phpBB/phpbb/notification/type/topic.php @@ -35,6 +35,13 @@ class topic extends \phpbb\notification\type\base protected $language_key = 'NOTIFICATION_TOPIC'; /** + * Inherit notification read status from topic. + * + * @var bool + */ + protected $inherit_read_status = true; + + /** * Notification option data (for outputting to the user) * * @var bool|array False if the service should use it's default data @@ -220,7 +227,7 @@ class topic extends \phpbb\notification\type\base */ public function pre_create_insert_array($post, $notify_users) { - if (!sizeof($notify_users)) + if (!sizeof($notify_users) || !$this->inherit_read_status) { return array(); } @@ -261,7 +268,7 @@ class topic extends \phpbb\notification\type\base // Topics can be "read" before they are public (while awaiting approval). // Make sure that if the user has read the topic, it's marked as read in the notification - if (isset($pre_create_data[$this->user_id]) && $pre_create_data[$this->user_id] >= $this->notification_time) + if ($this->inherit_read_status && isset($pre_create_data[$this->user_id]) && $pre_create_data[$this->user_id] >= $this->notification_time) { $this->notification_read = true; } |