aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index bfae85bd92..66d3b182a2 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -278,7 +278,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = TRUE)
}
if (!count($where_ids))
{
- return;
+ return false;
}
$post_ids = $topic_ids = $forum_ids = array();
@@ -297,7 +297,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = TRUE)
if (!count($post_ids))
{
- return;
+ return false;
}
$where_sql = ' WHERE post_id IN (' . implode(', ', $post_ids) . ')';
@@ -309,6 +309,8 @@ function delete_posts($where_type, $where_ids, $auto_sync = TRUE)
$db->sql_query('DELETE FROM ' . SEARCH_MATCH_TABLE . $where_sql);
$db->sql_transaction('commit');
+ delete_attachment($post_ids);
+
if ($auto_sync)
{
sync('reported', 'topic_id', $topic_ids);