From 0f9b3bcc27e7daf7d605a7a38310a8f62b9a76e8 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Sat, 17 Apr 2010 03:13:30 -0400 Subject: [feature/system-cron] Refactored cron task naming, loading and running. PHPBB3-9596 --- phpBB/viewforum.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 8a06e28394..a3fd9fa6fb 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -193,9 +193,13 @@ if ($forum_data['forum_topics_per_page']) } // Do the forum Prune thang - cron type job ... -if (!$config['use_system_cron'] && $cron->is_task_runnable('prune_forum', array($forum_data))) +if (!$config['use_system_cron']) { - $template->assign_var('RUN_CRON_TASK', $cron->generate_task_code('prune_forum', array($forum_id))); + $task = $cron->instantiate_task('core_prune_forum', $forum_data); + if ($task && $task->is_ready()) { + $url = $task->get_url(); + $template->assign_var('RUN_CRON_TASK', 'cron'); + } } // Forum rules and subscription info -- cgit v1.2.1