1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-29 21:10:31 +02:00

- search deals with global topics

- fixed some other search related bugs


git-svn-id: file:///svn/phpbb/trunk@5482 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann
2006-01-21 22:57:42 +00:00
parent 133ce52d3b
commit 7de53b46ec
9 changed files with 96 additions and 43 deletions

View File

@@ -521,7 +521,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true)
}
$post_ids = $topic_ids = $forum_ids = array();
$sql = 'SELECT post_id, topic_id, forum_id
$sql = 'SELECT post_id, poster_id, topic_id, forum_id
FROM ' . POSTS_TABLE . "
WHERE $where_type " . ((!is_array($where_ids)) ? "= $where_ids" : 'IN (' . implode(', ', $where_ids) . ')');
$result = $db->sql_query($sql);
@@ -529,6 +529,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true)
while ($row = $db->sql_fetchrow($result))
{
$post_ids[] = $row['post_id'];
$poster_ids[] = $row['poster_id'];
$topic_ids[] = $row['topic_id'];
$forum_ids[] = $row['forum_id'];
}
@@ -570,7 +571,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true)
trigger_error($error);
}
$search->index_remove($where_ids);
$search->index_remove($post_ids, $poster_ids);
delete_attachments('post', $post_ids, false);