From be087826b084815802e45195db4adc72d0b57e17 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Sun, 9 May 2010 15:02:39 -0400 Subject: [PATCH] [feature/system-cron] Added missing include to prune all forums task. PHPBB3-9596 --- phpBB/includes/cron/tasks/core/prune_all_forums.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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();