mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-19 07:08:09 +01:00
[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
This commit is contained in:
parent
9eb6c2ba5b
commit
794d6ec443
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user