aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/prune.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-04-04 11:51:25 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-04-04 11:51:25 +0000
commitd2d4a073c988003650c09b4695f94051734e91fe (patch)
treee06e4a9e990c93c7b64b632a3a92ec10abf51ebb /phpBB/includes/prune.php
parent7012f5168f74216819b9148fd1e78b06f4dee3ff (diff)
downloadforums-d2d4a073c988003650c09b4695f94051734e91fe.tar
forums-d2d4a073c988003650c09b4695f94051734e91fe.tar.gz
forums-d2d4a073c988003650c09b4695f94051734e91fe.tar.bz2
forums-d2d4a073c988003650c09b4695f94051734e91fe.tar.xz
forums-d2d4a073c988003650c09b4695f94051734e91fe.zip
Minor change to cope with a now fixed (I think) situation where last_post_id was set to 0 ... would leave these topics and posts in place during prune
git-svn-id: file:///svn/phpbb/trunk@2478 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/prune.php')
-rw-r--r--phpBB/includes/prune.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/includes/prune.php b/phpBB/includes/prune.php
index 0798ec2322..1d2f17e57d 100644
--- a/phpBB/includes/prune.php
+++ b/phpBB/includes/prune.php
@@ -39,7 +39,8 @@ function prune($forum_id, $prune_date)
WHERE t.forum_id = $forum_id
AND t.topic_vote = 0
AND t.topic_type <> " . POST_ANNOUNCE . "
- AND p.post_id = t.topic_last_post_id";
+ AND ( p.post_id = t.topic_last_post_id
+ OR t.topic_last_post_id = 0 )";
if ( $prune_date != '' )
{
$sql .= " AND p.post_time < $prune_date";