diff options
author | nomind60s <nomind60s@users.noreply.github.com> | 2017-03-20 23:06:34 -0600 |
---|---|---|
committer | nomind60s <nomind60s@users.noreply.github.com> | 2017-03-20 23:06:34 -0600 |
commit | 7609ba71e98071cf5549de9d9baea253609ecd00 (patch) | |
tree | fbfc3711fe43d958819dc098cb3f6800452597e7 /phpBB/viewtopic.php | |
parent | 927220c87372c41abd0d8f4ff30937e7e4befceb (diff) | |
download | forums-7609ba71e98071cf5549de9d9baea253609ecd00.tar forums-7609ba71e98071cf5549de9d9baea253609ecd00.tar.gz forums-7609ba71e98071cf5549de9d9baea253609ecd00.tar.bz2 forums-7609ba71e98071cf5549de9d9baea253609ecd00.tar.xz forums-7609ba71e98071cf5549de9d9baea253609ecd00.zip |
[ticket/15137] Global announcements can stick for a non-zero number of days
To be consistent with Sticky and Announcements topic types, Global
announcements can now stick for a non-zero number of days, i.e. they are
no longer never ending.
Before this change, if the topic type was Global and a non-zero number of
days where set to stick topic, the number was silently ignored and a Global
announcement was always never ending.
PHPBB3-15137
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 378e2d8f97..e9cb2dd383 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -321,8 +321,8 @@ if ($post_id) $topic_id = (int) $topic_data['topic_id']; $topic_replies = $phpbb_content_visibility->get_count('topic_posts', $topic_data, $forum_id) - 1; -// Check sticky/announcement time limit -if (($topic_data['topic_type'] == POST_STICKY || $topic_data['topic_type'] == POST_ANNOUNCE) && $topic_data['topic_time_limit'] && ($topic_data['topic_time'] + $topic_data['topic_time_limit']) < time()) +// Check sticky/announcement/global time limit +if (($topic_data['topic_type'] != POST_NORMAL) && $topic_data['topic_time_limit'] && ($topic_data['topic_time'] + $topic_data['topic_time_limit']) < time()) { $sql = 'UPDATE ' . TOPICS_TABLE . ' SET topic_type = ' . POST_NORMAL . ', topic_time_limit = 0 |