1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 13:30:25 +02:00

[ticket/12150] Add file and caller for pruning shadow topics

PHPBB3-12150
This commit is contained in:
Marc Alexander
2014-01-31 23:06:03 +01:00
parent a7abf8218d
commit 02fdae4e88
5 changed files with 218 additions and 0 deletions

View File

@@ -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) . "