aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/cron/tasks/core/prune_all_forums.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/cron/tasks/core/prune_all_forums.php b/phpBB/includes/cron/tasks/core/prune_all_forums.php
index 6d39fe6a15..de7ea557b0 100644
--- a/phpBB/includes/cron/tasks/core/prune_all_forums.php
+++ b/phpBB/includes/cron/tasks/core/prune_all_forums.php
@@ -37,7 +37,13 @@ class cron_task_core_prune_all_forums extends cron_task_base
*/
public function run()
{
- global $db;
+ global $phpbb_root_path, $phpEx, $db;
+
+ if (!function_exists('auto_prune'))
+ {
+ include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
+
$sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, forum_flags, prune_freq
FROM ' . FORUMS_TABLE . "
WHERE enable_prune = 1 and prune_next < " . time();