1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-31 05:53:14 +02:00

Merge branch '3.2.x'

* 3.2.x:
  [ticket/15137] Missed one language string change
  [ticket/15137] Global announcements can stick for a non-zero number of days
This commit is contained in:
Tristan Darricau 2017-03-21 16:29:38 +01:00
commit 9b6fa7421b
No known key found for this signature in database
GPG Key ID: 817043C2E29DB881
2 changed files with 4 additions and 4 deletions

View File

@ -241,9 +241,9 @@ $lang = array_merge($lang, array(
'SMILIES' => 'Smilies',
'SMILIES_ARE_OFF' => 'Smilies are <em>OFF</em>',
'SMILIES_ARE_ON' => 'Smilies are <em>ON</em>',
'STICKY_ANNOUNCE_TIME_LIMIT'=> 'Sticky/Announcement time limit',
'STICKY_ANNOUNCE_TIME_LIMIT'=> 'Sticky/Announcement/Global time limit',
'STICK_TOPIC_FOR' => 'Stick topic for',
'STICK_TOPIC_FOR_EXPLAIN' => 'Enter 0 for a never ending Sticky/Announcement. Please note that this number is relative to the date of the post.',
'STICK_TOPIC_FOR_EXPLAIN' => 'Enter 0 for a never ending Sticky/Announcement/Global. Please note that this number is relative to the date of the post.',
'STYLES_TIP' => 'Tip: Styles can be applied quickly to selected text.',
'TOO_FEW_CHARS' => 'Your message contains too few characters.',

View File

@ -323,8 +323,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