mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
- overhauled search system
- updated structure for search backend plugins - better result caching using ACM - search results no longer session restricted => link to them by copying the URL :) - in-topic search - indexing posts now uses search backend plugins - develop/search_fill.php working again - fulltext_mysql not working yet - tiny bugfixes to ACM git-svn-id: file:///svn/phpbb/trunk@5441 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1812,11 +1812,28 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
WHERE topic_moved_id = ' . $data['topic_id']);
|
||||
}
|
||||
|
||||
// Fulltext parse
|
||||
// Index message contents
|
||||
if ($update_message && $data['enable_indexing'])
|
||||
{
|
||||
$search = new fulltext_search();
|
||||
$result = $search->add($mode, $data['post_id'], $data['message'], $subject);
|
||||
// Select the search method and do some additional checks to ensure it can actually be utilised
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
{
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
|
||||
require("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
|
||||
$error = false;
|
||||
$search = new $search_type($error);
|
||||
|
||||
if ($error)
|
||||
{
|
||||
trigger_error($error);
|
||||
}
|
||||
|
||||
$search->index($mode, $data['post_id'], $data['message'], $subject);
|
||||
}
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
Reference in New Issue
Block a user