mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Allow a a comma delimited set of post id's to be sent to remove words function ... for modcp et al
git-svn-id: file:///svn/phpbb/trunk@2336 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1ab738dcb2
commit
03c6ace568
1 changed files with 6 additions and 4 deletions
|
@ -347,7 +347,7 @@ function remove_common($mode, $fraction, $word_id_list = array())
|
|||
return $word_count;
|
||||
}
|
||||
|
||||
function remove_search_post($post_id)
|
||||
function remove_search_post($post_id_sql)
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
@ -359,7 +359,8 @@ function remove_search_post($post_id)
|
|||
case 'mysql4':
|
||||
$sql = "SELECT word_id
|
||||
FROM " . SEARCH_MATCH_TABLE . "
|
||||
WHERE post_id = $post_id";
|
||||
WHERE post_id IN ($post_id_sql)
|
||||
GROUP BY word_id";
|
||||
if ( $result = $db->sql_query($sql) )
|
||||
{
|
||||
$word_id_sql = '';
|
||||
|
@ -404,7 +405,8 @@ function remove_search_post($post_id)
|
|||
WHERE word_id IN (
|
||||
SELECT word_id
|
||||
FROM " . SEARCH_MATCH_TABLE . "
|
||||
WHERE post_id = $post_id
|
||||
WHERE post_id IN ($post_id_sql)
|
||||
GROUP BY word_id
|
||||
)
|
||||
GROUP BY word_id
|
||||
HAVING COUNT(word_id) = 1
|
||||
|
@ -420,7 +422,7 @@ function remove_search_post($post_id)
|
|||
}
|
||||
|
||||
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
|
||||
WHERE post_id = $post_id";
|
||||
WHERE post_id IN ($post_id_sql)";
|
||||
if ( !($db->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
|
||||
|
|
Loading…
Add table
Reference in a new issue