1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/11011] passing global variables

Pass global variables to class constructor when making a new object.

PHPBB3-11011
This commit is contained in:
Dhruv
2012-07-24 12:10:22 +05:30
parent 33c6d7c8be
commit 2e218776bb
3 changed files with 3 additions and 7 deletions

View File

@@ -596,7 +596,7 @@ class acp_search
*/
function init_search($type, &$search, &$error)
{
global $phpbb_root_path, $phpEx, $user;
global $phpbb_root_path, $phpEx, $user, $config, $db;
if (!class_exists($type) || !method_exists($type, 'keyword_search'))
{
@@ -605,7 +605,7 @@ class acp_search
}
$error = false;
$search = new $type($error);
$search = new $type($error, $phpbb_root_path, $phpEx, $config, $db, $user);
return $error;
}