From c513153d43461f8644336c58064f69fb40b63c7b Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Thu, 28 Nov 2002 02:02:38 +0000 Subject: [PATCH] If you were guessing these were fixes then ... HAH! ... you were ... right. git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3135 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 2 +- phpBB/includes/prune.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 7331101ea7..e9a58c9bd9 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -116,7 +116,7 @@ h3 {font-size:12pt;color:blue}
  • Changed user topic notification default in schemas to 0 (off)
  • Fixed non-XHTML compliant img tags in privmsg.php
  • Fixed non-deletion of announcements and polls when removing forum contents in forum admin
  • -
  • +
  • Fixed non-pruning of watched topics table when pruning related topics
  • diff --git a/phpBB/includes/prune.php b/phpBB/includes/prune.php index c9cb6fe4c6..ae4d8ae002 100644 --- a/phpBB/includes/prune.php +++ b/phpBB/includes/prune.php @@ -76,9 +76,16 @@ function prune($forum_id, $prune_date, $prune_all = false;) if ( $sql_post != '' ) { - $sql = "DELETE FROM " . TOPICS_TABLE . " + $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id IN ($sql_topics)"; if ( !$db->sql_query($sql, BEGIN_TRANSACTION) ) + { + message_die(GENERAL_ERROR, 'Could not delete watched topics during prune', '', __LINE__, __FILE__, $sql); + } + + $sql = "DELETE FROM " . TOPICS_TABLE . " + WHERE topic_id IN ($sql_topics)"; + if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete topics during prune', '', __LINE__, __FILE__, $sql); }