From 02fdae4e8800ded878dcdc848563aef202069317 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 31 Jan 2014 23:06:03 +0100 Subject: [ticket/12150] Add file and caller for pruning shadow topics PHPBB3-12150 --- phpBB/includes/functions_admin.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'phpBB/includes/functions_admin.php') diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 81a381b326..a277429c32 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2326,6 +2326,11 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync $sql_and .= " AND topic_last_view_time < $prune_date"; } + if ($prune_mode == 'shadow') + { + $sql_and .= ' AND topic_type = ' . ITEM_MOVED . "AND topic_last_post_time < $prune_date"; + } + $sql = 'SELECT topic_id FROM ' . TOPICS_TABLE . ' WHERE ' . $db->sql_in_set('forum_id', $forum_id) . " -- cgit v1.2.1 From 76b7355b8744345700a61fa635d7738f9726875e Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 2 Feb 2014 17:51:05 +0100 Subject: [ticket/12150] Add missing space to query for shadow topics PHPBB3-12150 --- phpBB/includes/functions_admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions_admin.php') diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index a277429c32..2bf8e6dcf0 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2328,7 +2328,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync if ($prune_mode == 'shadow') { - $sql_and .= ' AND topic_type = ' . ITEM_MOVED . "AND topic_last_post_time < $prune_date"; + $sql_and .= ' AND topic_status = ' . ITEM_MOVED . " AND topic_last_post_time < $prune_date"; } $sql = 'SELECT topic_id -- cgit v1.2.1