diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2013-07-11 14:24:07 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2013-07-11 14:24:07 +0200 |
| commit | 9aed758c1397c31b979f4aca51249c73d21bd6f5 (patch) | |
| tree | 03c13aa87f3aa0ca892fe8bca937d2de7054bff5 /phpBB/search.php | |
| parent | 9f89cb4cfbbd46ad45a9c7942fc2233b489bb076 (diff) | |
| download | forums-9aed758c1397c31b979f4aca51249c73d21bd6f5.tar forums-9aed758c1397c31b979f4aca51249c73d21bd6f5.tar.gz forums-9aed758c1397c31b979f4aca51249c73d21bd6f5.tar.bz2 forums-9aed758c1397c31b979f4aca51249c73d21bd6f5.tar.xz forums-9aed758c1397c31b979f4aca51249c73d21bd6f5.zip | |
[ticket/9657] Use the service instead of the static class
PHPBB3-9657
Diffstat (limited to 'phpBB/search.php')
| -rw-r--r-- | phpBB/search.php | 8 |
1 files changed, 5 insertions, 3 deletions
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); |
