mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 20:38:52 +00:00
[ticket/11052] update search backend constructor everywhere
PHPBB3-11052
This commit is contained in:
parent
938805106c
commit
7c406e1e81
5 changed files with 8 additions and 8 deletions
|
@ -40,7 +40,7 @@ if (!class_exists($search_type))
|
||||||
}
|
}
|
||||||
|
|
||||||
$error = false;
|
$error = false;
|
||||||
$search = new $search_type($error);
|
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
|
||||||
|
|
||||||
if ($error)
|
if ($error)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@ class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $config, $error;
|
global $phpbb_root_path, $phpEx, $config, $error, $auth, $db, $user;
|
||||||
|
|
||||||
// Select the search method
|
// Select the search method
|
||||||
$search_type = basename($config['search_type']);
|
$search_type = basename($config['search_type']);
|
||||||
|
@ -43,7 +43,7 @@ class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
|
||||||
|
|
||||||
// We do some additional checks in the module to ensure it can actually be utilised
|
// We do some additional checks in the module to ensure it can actually be utilised
|
||||||
$error = false;
|
$error = false;
|
||||||
$search = new $search_type($error);
|
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
|
|
|
@ -723,7 +723,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
||||||
*/
|
*/
|
||||||
function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = true, $post_count_sync = true, $call_delete_topics = true)
|
function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = true, $post_count_sync = true, $call_delete_topics = true)
|
||||||
{
|
{
|
||||||
global $db, $config, $phpbb_root_path, $phpEx;
|
global $db, $config, $phpbb_root_path, $phpEx, $auth, $user;
|
||||||
|
|
||||||
if ($where_type === 'range')
|
if ($where_type === 'range')
|
||||||
{
|
{
|
||||||
|
@ -855,7 +855,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||||
}
|
}
|
||||||
|
|
||||||
$error = false;
|
$error = false;
|
||||||
$search = new $search_type($error);
|
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
|
||||||
|
|
||||||
if ($error)
|
if ($error)
|
||||||
{
|
{
|
||||||
|
|
|
@ -915,7 +915,7 @@ function mcp_fork_topic($topic_ids)
|
||||||
}
|
}
|
||||||
|
|
||||||
$error = false;
|
$error = false;
|
||||||
$search = new $search_type($error);
|
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
|
||||||
$search_mode = 'post';
|
$search_mode = 'post';
|
||||||
|
|
||||||
if ($error)
|
if ($error)
|
||||||
|
|
|
@ -393,7 +393,7 @@ function mcp_post_details($id, $mode, $action)
|
||||||
*/
|
*/
|
||||||
function change_poster(&$post_info, $userdata)
|
function change_poster(&$post_info, $userdata)
|
||||||
{
|
{
|
||||||
global $auth, $db, $config, $phpbb_root_path, $phpEx;
|
global $auth, $db, $config, $phpbb_root_path, $phpEx, $user;
|
||||||
|
|
||||||
if (empty($userdata) || $userdata['user_id'] == $post_info['user_id'])
|
if (empty($userdata) || $userdata['user_id'] == $post_info['user_id'])
|
||||||
{
|
{
|
||||||
|
@ -470,7 +470,7 @@ function change_poster(&$post_info, $userdata)
|
||||||
{
|
{
|
||||||
// We do some additional checks in the module to ensure it can actually be utilised
|
// We do some additional checks in the module to ensure it can actually be utilised
|
||||||
$error = false;
|
$error = false;
|
||||||
$search = new $search_type($error);
|
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
|
||||||
|
|
||||||
if (!$error && method_exists($search, 'destroy_cache'))
|
if (!$error && method_exists($search, 'destroy_cache'))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue