aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorgpolins <gpolins@users.sourceforge.net>2001-08-16 04:49:42 +0000
committergpolins <gpolins@users.sourceforge.net>2001-08-16 04:49:42 +0000
commit1390d48aa3b90c3925235120a015d8a00cf889a0 (patch)
tree1f17b1edda72f17b7d207ab35ffce39a7ddaaf94 /phpBB
parent5c7b614ee13d7ca9fc61e3e668b6d42de9fd2c0b (diff)
downloadforums-1390d48aa3b90c3925235120a015d8a00cf889a0.tar
forums-1390d48aa3b90c3925235120a015d8a00cf889a0.tar.gz
forums-1390d48aa3b90c3925235120a015d8a00cf889a0.tar.bz2
forums-1390d48aa3b90c3925235120a015d8a00cf889a0.tar.xz
forums-1390d48aa3b90c3925235120a015d8a00cf889a0.zip
Deleting moved topics now works
git-svn-id: file:///svn/phpbb/trunk@890 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/modcp.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/modcp.php b/phpBB/modcp.php
index 42d84319a4..b2cda4a96b 100644
--- a/phpBB/modcp.php
+++ b/phpBB/modcp.php
@@ -168,15 +168,18 @@ switch($mode)
$sql = "SELECT post_id FROM ".POSTS_TABLE." WHERE ";
$delete_topics = "DELETE FROM ".TOPICS_TABLE." WHERE ";
+ $moved_topics = "DELETE FROM ".TOPICS_TABLE. " WHERE ";
for($x = 0; $x < count($topics); $x++)
{
if($x > 0)
{
$sql .= " OR ";
$delete_topics .= " OR ";
+ $moved_topics .= " OR ";
}
$sql .= "topic_id = ".$topics[$x];
$delete_topics .= "topic_id = ".$topics[$x];
+ $moved_topics .= "topic_moved_id = ".$topics[$x];
}
$topics_removed = $x;
@@ -215,6 +218,11 @@ switch($mode)
message_die(GENERAL_ERROR, "Could not delete topics!", "Error", __LINE__, __FILE__, $delete_topics);
}
+ if(!$result = $db->sql_query($moved_topics))
+ {
+ message_die(GENERAL_ERRORm "Could not delete moved topics!", "Error", __LINE__, __FILE__, $moved_topics);
+ }
+
if(SQL_LAYER != "mysql")
{
$update_index = "UPDATE ".FORUMS_TABLE."