1
0
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:
nomind60s
2017-03-20 23:06:34 -06:00
parent 927220c873
commit 7609ba71e9
3 changed files with 5 additions and 5 deletions

View File

@@ -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