1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 00:37:42 +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:
Nils Adermann
2006-01-11 18:56:07 +00:00
parent 9ea5fa1768
commit 0e0b1120fb
22 changed files with 1522 additions and 1036 deletions

View File

@@ -509,7 +509,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true)
*/
function delete_posts($where_type, $where_ids, $auto_sync = true)
{
global $db;
global $db, $config, $phpbb_root_path, $phpEx;
if (is_array($where_ids))
{
@@ -542,7 +542,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true)
$db->sql_transaction('begin');
$table_ary = array(POSTS_TABLE, REPORTS_TABLE, SEARCH_MATCH_TABLE);
$table_ary = array(POSTS_TABLE, REPORTS_TABLE);
foreach ($table_ary as $table)
{
@@ -552,6 +552,26 @@ function delete_posts($where_type, $where_ids, $auto_sync = true)
}
unset($table_ary);
// Remove the message from the search index
$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_remove($where_ids);
delete_attachments('post', $post_ids, false);
$db->sql_transaction('commit');