mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-14 04:30:29 +01:00
Merge remote-tracking branch 'cyberalien/ticket/10637' into develop
* cyberalien/ticket/10637: [ticket/10637] Leftovers from implementation of extensions in convertor [ticket/10637] Leftovers from implementation of extensions in develop tools [ticket/10637] Leftovers from implementation of extensions in mcp_post [ticket/10637] Leftovers from implementation of extensions in mcp_main [ticket/10637] Leftovers from implementation of extensions
This commit is contained in:
commit
56ef5d5025
@ -25,7 +25,6 @@ $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
require($phpbb_root_path . 'common.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/acp/acp_search.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/search/' . $class_name . '.' . $phpEx);
|
||||
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
|
@ -34,13 +34,11 @@ $user->setup();
|
||||
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
|
||||
require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx);
|
||||
|
||||
$error = false;
|
||||
$search = new $search_type($error);
|
||||
|
||||
|
@ -847,15 +847,13 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
}
|
||||
|
||||
// Remove the message from the search index
|
||||
$search_type = basename($config['search_type']);
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
|
||||
include_once("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
|
||||
$error = false;
|
||||
$search = new $search_type($error);
|
||||
|
||||
|
@ -907,16 +907,11 @@ function mcp_fork_topic($topic_ids)
|
||||
if (!isset($search_type) && $topic_row['enable_indexing'])
|
||||
{
|
||||
// Select the search method and do some additional checks to ensure it can actually be utilised
|
||||
$search_type = basename($config['search_type']);
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
{
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
include("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
|
||||
$error = false;
|
||||
|
@ -464,12 +464,10 @@ function change_poster(&$post_info, $userdata)
|
||||
}
|
||||
|
||||
// refresh search cache of this post
|
||||
$search_type = basename($config['search_type']);
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
if (file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (class_exists($search_type))
|
||||
{
|
||||
require("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
|
||||
// We do some additional checks in the module to ensure it can actually be utilised
|
||||
$error = false;
|
||||
$search = new $search_type($error);
|
||||
|
@ -735,22 +735,20 @@ class install_convert extends module
|
||||
$this->p_master->error(sprintf($user->lang['COULD_NOT_FIND_PATH'], $convert->options['forum_path']), __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
$search_type = basename(trim($config['search_type']));
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
// For conversions we are a bit less strict and set to a search backend we know exist...
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
$search_type = 'fulltext_native';
|
||||
$search_type = 'phpbb_search_fulltext_native';
|
||||
set_config('search_type', $search_type);
|
||||
}
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
|
||||
require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx);
|
||||
|
||||
$error = false;
|
||||
$convert->fulltext_search = new $search_type($error);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user