From 170333a6fca0dcc227152b3c8da79fad3bd6f475 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin 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