1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 16:27:38 +02:00

[feature/extension-manager] Make search backends loadable from extensions

Search backends are now required to be autoloadable. The database updater to
3.1 tries to guess the class name as phpbb_search_<oldname> which works for
the default backends we ship.

PHPBB3-10323
This commit is contained in:
Nils Adermann
2011-08-15 20:00:47 -04:00
parent fb943d4d6b
commit dcc5ca5377
8 changed files with 44 additions and 46 deletions

View File

@@ -2350,16 +2350,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
if ($update_search_index && $data['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;