aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2010-03-11 00:38:56 +0100
committerJoas Schilling <nickvergessen@gmx.de>2011-04-07 13:45:44 +0200
commit3352141264993982215b714ac7a128854494ac1f (patch)
tree1fc4a4d85919402e957b1ce6448764aad791bc0d /phpBB/search.php
parent7074d19c4087fab0e81a31bd806724d7eac7ef87 (diff)
downloadforums-3352141264993982215b714ac7a128854494ac1f.tar
forums-3352141264993982215b714ac7a128854494ac1f.tar.gz
forums-3352141264993982215b714ac7a128854494ac1f.tar.bz2
forums-3352141264993982215b714ac7a128854494ac1f.tar.xz
forums-3352141264993982215b714ac7a128854494ac1f.zip
[ticket/9684] Remove code for global announcement in root-files
PHPBB3-9684
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php31
1 files changed, 1 insertions, 30 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 7f5c49f4fc..c68931f33f 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -832,35 +832,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$result_topic_id = $row['topic_id'];
$topic_title = censor_text($row['topic_title']);
- // we need to select a forum id for this global topic
- if (!$forum_id)
- {
- if (!isset($g_forum_id))
- {
- // Get a list of forums the user cannot read
- $forum_ary = array_unique(array_keys($auth->acl_getf('!f_read', true)));
-
- // Determine first forum the user is able to read (must not be a category)
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_type = ' . FORUM_POST;
-
- if (sizeof($forum_ary))
- {
- $sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
- }
-
- $result = $db->sql_query_limit($sql, 1);
- $g_forum_id = (int) $db->sql_fetchfield('forum_id');
- }
- $u_forum_id = $g_forum_id;
- }
- else
- {
- $u_forum_id = $forum_id;
- }
-
- $view_topic_url_params = "f=$u_forum_id&amp;t=$result_topic_id" . (($u_hilit) ? "&amp;hilit=$u_hilit" : '');
+ $view_topic_url_params = "f=$forum_id&amp;t=$result_topic_id" . (($u_hilit) ? "&amp;hilit=$u_hilit" : '');
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
$replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
@@ -911,7 +883,6 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
- 'S_TOPIC_GLOBAL' => (!$forum_id) ? true : false,
'S_TOPIC_TYPE' => $row['topic_type'],
'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false,
'S_UNREAD_TOPIC' => $unread_topic,