From 170333a6fca0dcc227152b3c8da79fad3bd6f475 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin <cyberalien@gmail.com> Date: Sat, 11 May 2013 22:49:42 +0300 Subject: [ticket/10772] Use forum specific style for trigger_error PHPBB3-10772 --- phpBB/viewtopic.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 74420a25c7..90625d3f99 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -146,7 +146,15 @@ if ($view && !$post_id) if (!$row) { - $user->setup('viewtopic'); + // Check for forum style + $sql = 'SELECT forum_style + FROM ' . FORUMS_TABLE . " + WHERE forum_id = $forum_id"; + $result = $db->sql_query($sql); + $forum_style = (int) $db->sql_fetchfield('forum_style'); + $db->sql_freeresult($result); + + $user->setup('viewtopic', $forum_style); trigger_error(($view == 'next') ? 'NO_NEWER_TOPICS' : 'NO_OLDER_TOPICS'); } else -- cgit v1.2.1 From 1ea1247cd583e1f3f45a4b83310dc3e934caf00d Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin <cyberalien@gmail.com> Date: Thu, 16 May 2013 09:34:58 +0300 Subject: [ticket/10772] Remove unnecessary comment PHPBB3-10772 --- phpBB/viewtopic.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 90625d3f99..fb12dd925a 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -146,7 +146,6 @@ if ($view && !$post_id) if (!$row) { - // Check for forum style $sql = 'SELECT forum_style FROM ' . FORUMS_TABLE . " WHERE forum_id = $forum_id"; -- cgit v1.2.1