aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_post.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_post.php')
-rw-r--r--phpBB/includes/functions_post.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/includes/functions_post.php b/phpBB/includes/functions_post.php
index 2dc3bd2bfa..ce1049ac13 100644
--- a/phpBB/includes/functions_post.php
+++ b/phpBB/includes/functions_post.php
@@ -527,7 +527,8 @@ function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
if ( $post_data['first_post'] )
{
$sql = "DELETE FROM " . TOPICS_TABLE . "
- WHERE topic_id = $topic_id";
+ WHERE topic_id = $topic_id
+ OR topic_moved_id = $topic_id";
if ( !($db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);