mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user