From 9aed758c1397c31b979f4aca51249c73d21bd6f5 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 11 Jul 2013 14:24:07 +0200 Subject: [ticket/9657] Use the service instead of the static class PHPBB3-9657 --- phpBB/search.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'phpBB/search.php') diff --git a/phpBB/search.php b/phpBB/search.php index 585bd61f0a..2429c81dae 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -119,6 +119,8 @@ $sort_by_text = array('a' => $user->lang['SORT_AUTHOR'], 't' => $user->lang['SOR $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); +$phpbb_content_visibility = $phpbb_container->get('content.visibility'); + if ($keywords || $author || $author_id || $search_id || $submit) { // clear arrays @@ -250,8 +252,8 @@ if ($keywords || $author || $author_id || $search_id || $submit) $db->sql_freeresult($result); // find out in which forums the user is allowed to view posts - $m_approve_posts_fid_sql = phpbb_content_visibility::get_global_visibility_sql('post', $ex_fid_ary, 'p.'); - $m_approve_topics_fid_sql = phpbb_content_visibility::get_global_visibility_sql('topic', $ex_fid_ary, 't.'); + $m_approve_posts_fid_sql = $phpbb_content_visibility->get_global_visibility_sql('post', $ex_fid_ary, 'p.'); + $m_approve_topics_fid_sql = $phpbb_content_visibility->get_global_visibility_sql('topic', $ex_fid_ary, 't.'); if ($reset_search_forum) { @@ -860,7 +862,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $forum_id = $row['forum_id']; $result_topic_id = $row['topic_id']; $topic_title = censor_text($row['topic_title']); - $replies = phpbb_content_visibility::get_count('topic_posts', $row, $forum_id) - 1; + $replies = $phpbb_content_visibility->get_count('topic_posts', $row, $forum_id) - 1; $view_topic_url_params = "f=$forum_id&t=$result_topic_id" . (($u_hilit) ? "&hilit=$u_hilit" : ''); $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params); -- cgit v1.2.1