[feature/soft-delete] Fix a problem with "delete topics" in mcp

PHPBB3-9657
This commit is contained in:
Joas Schilling 2012-12-18 15:32:13 +01:00
parent 63f3cd45bb
commit 6435b481c5

View file

@ -71,9 +71,10 @@ class mcp_queue
{ {
if (!empty($topic_id_list)) if (!empty($topic_id_list))
{ {
$post_visibility = ($mode == 'deleted_topics') ? ITEM_DELETED : ITEM_UNAPPROVED;
$sql = 'SELECT post_id $sql = 'SELECT post_id
FROM ' . POSTS_TABLE . ' FROM ' . POSTS_TABLE . '
WHERE post_visibility = ' . ITEM_UNAPPROVED . ' WHERE post_visibility = ' . $post_visibility . '
AND ' . $db->sql_in_set('topic_id', $topic_id_list); AND ' . $db->sql_in_set('topic_id', $topic_id_list);
$result = $db->sql_query($sql); $result = $db->sql_query($sql);