aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-01-11 18:56:07 +0000
committerNils Adermann <naderman@naderman.de>2006-01-11 18:56:07 +0000
commit0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007 (patch)
tree5cd57f820281c20c6936433d92483cc4712a7ab7 /phpBB/includes/functions_admin.php
parent9ea5fa1768feebfb04f2303788eb4c685161e3dd (diff)
downloadforums-0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007.tar
forums-0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007.tar.gz
forums-0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007.tar.bz2
forums-0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007.tar.xz
forums-0e0b1120fba8ed4f2ebc5d62eb29b1a34c1b1007.zip
- 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
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php24
1 files changed, 22 insertions, 2 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 3929b43448..08f90fab83 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -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');