From 27fdcb4c7ec4aac68ba0a809473312ee83b50a66 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 11 Mar 2010 16:03:14 +0100 Subject: [ticket/9684] Remove code in some more files especially includes/ Topic-Tracking is still missing. PHPBB3-9684 --- phpBB/viewforum.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index ebf2dc3501..fbc4d63405 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -359,6 +359,10 @@ if ($user->data['is_registered']) if ($forum_data['forum_type'] == FORUM_POST) { + // Get global announcement forums + $g_forum_ary = $auth->acl_getf('f_read', true); + $g_forum_ary = array_unique(array_keys($g_forum_ary)); + // Obtain announcements ... removed sort ordering, sort by time in all cases $sql = $db->sql_build_query('SELECT', array( 'SELECT' => $sql_array['SELECT'], @@ -366,7 +370,9 @@ if ($forum_data['forum_type'] == FORUM_POST) 'LEFT_JOIN' => $sql_array['LEFT_JOIN'], 'WHERE' => '(t.forum_id = ' . $forum_id . ' - AND t.topic_type = ' . POST_ANNOUNCE . ') OR t.topic_type = ' . POST_GLOBAL, + AND t.topic_type = ' . POST_ANNOUNCE . ') OR + (' . $db->sql_in_set('t.forum_id', $g_forum_ary) . ' + AND t.topic_type = ' . POST_GLOBAL . ')', 'ORDER_BY' => 't.topic_time DESC', )); -- cgit v1.2.1