From 794d6ec443bd16ad2f7776d1ba2abcf2ce1c5553 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Wed, 8 Aug 2012 11:07:47 +0530 Subject: [PATCH] [ticket/11011] pass $auth to search backend constructor $auth global var is passed to search backend constructor, as it is used by sphinx backend. PHPBB3-11011 --- phpBB/includes/acp/acp_search.php | 4 ++-- phpBB/includes/search/fulltext_mysql.php | 2 +- phpBB/includes/search/fulltext_native.php | 2 +- phpBB/includes/search/fulltext_postgres.php | 2 +- phpBB/includes/search/fulltext_sphinx.php | 2 +- phpBB/search.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php index 5ae9f363f0..6618e2c3f9 100644 --- a/phpBB/includes/acp/acp_search.php +++ b/phpBB/includes/acp/acp_search.php @@ -596,7 +596,7 @@ class acp_search */ function init_search($type, &$search, &$error) { - global $phpbb_root_path, $phpEx, $user, $config, $db; + global $phpbb_root_path, $phpEx, $user, $auth, $config, $db; if (!class_exists($type) || !method_exists($type, 'keyword_search')) { @@ -605,7 +605,7 @@ class acp_search } $error = false; - $search = new $type($error, $phpbb_root_path, $phpEx, $config, $db, $user); + $search = new $type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user); return $error; } diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index ccf9f49612..8320b8e760 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -37,7 +37,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base * * @param string|bool $error Any error that occurs is passed on through this reference variable otherwise false */ - public function __construct(&$error, $phpbb_root_path, $phpEx, $config, $db, $user) + public function __construct(&$error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user) { $this->config = $config; $this->db = $db; diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index a470a92458..b5f1a4f52f 100644 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -42,7 +42,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base * * @param boolean|string &$error is passed by reference and should either be set to false on success or an error message on failure. */ - public function __construct(&$error, $phpbb_root_path, $phpEx, $config, $db, $user) + public function __construct(&$error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user) { $this->phpbb_root_path = $phpbb_root_path; $this->phpEx = $phpEx; diff --git a/phpBB/includes/search/fulltext_postgres.php b/phpBB/includes/search/fulltext_postgres.php index 75cb48ecc6..0e6f72f142 100644 --- a/phpBB/includes/search/fulltext_postgres.php +++ b/phpBB/includes/search/fulltext_postgres.php @@ -41,7 +41,7 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base * * @param string|bool $error Any error that occurs is passed on through this reference variable otherwise false */ - public function __construct(&$error, $phpbb_root_path, $phpEx, $config, $db, $user) + public function __construct(&$error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user) { $this->config = $config; $this->db = $db; diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php index 0662b70a2b..d4ded8efc0 100644 --- a/phpBB/includes/search/fulltext_sphinx.php +++ b/phpBB/includes/search/fulltext_sphinx.php @@ -51,7 +51,7 @@ class phpbb_search_fulltext_sphinx * * @param string|bool $error Any error that occurs is passed on through this reference variable otherwise false */ - public function __construct(&$error, $phpbb_root_path, $phpEx, $config, $db, $user) + public function __construct(&$error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user) { $this->phpbb_root_path = $phpbb_root_path; $this->phpEx = $phpEx; diff --git a/phpBB/search.php b/phpBB/search.php index 68946e2a95..190da5247f 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -280,7 +280,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) } // We do some additional checks in the module to ensure it can actually be utilised $error = false; - $search = new $search_type($error, $phpbb_root_path, $phpEx, $config, $db, $user); + $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user); if ($error) {