diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2010-03-11 16:03:14 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2011-04-07 13:47:06 +0200 |
commit | 27fdcb4c7ec4aac68ba0a809473312ee83b50a66 (patch) | |
tree | c1cfbdb38e56d49c9b18c97c8560dac8caea4799 /phpBB/viewforum.php | |
parent | 3352141264993982215b714ac7a128854494ac1f (diff) | |
download | forums-27fdcb4c7ec4aac68ba0a809473312ee83b50a66.tar forums-27fdcb4c7ec4aac68ba0a809473312ee83b50a66.tar.gz forums-27fdcb4c7ec4aac68ba0a809473312ee83b50a66.tar.bz2 forums-27fdcb4c7ec4aac68ba0a809473312ee83b50a66.tar.xz forums-27fdcb4c7ec4aac68ba0a809473312ee83b50a66.zip |
[ticket/9684] Remove code in some more files especially includes/
Topic-Tracking is still missing.
PHPBB3-9684
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r-- | phpBB/viewforum.php | 8 |
1 files changed, 7 insertions, 1 deletions
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', )); |