diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2010-04-17 03:13:30 -0400 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-02-12 22:05:49 -0500 |
| commit | 0f9b3bcc27e7daf7d605a7a38310a8f62b9a76e8 (patch) | |
| tree | 15cacd0d8bc8a28bbf1cc73504e7f7f61803a987 /phpBB/viewforum.php | |
| parent | 61e0285da86ffaf825cfcd486b5372b9566e51d7 (diff) | |
| download | forums-0f9b3bcc27e7daf7d605a7a38310a8f62b9a76e8.tar forums-0f9b3bcc27e7daf7d605a7a38310a8f62b9a76e8.tar.gz forums-0f9b3bcc27e7daf7d605a7a38310a8f62b9a76e8.tar.bz2 forums-0f9b3bcc27e7daf7d605a7a38310a8f62b9a76e8.tar.xz forums-0f9b3bcc27e7daf7d605a7a38310a8f62b9a76e8.zip | |
[feature/system-cron] Refactored cron task naming, loading and running.
PHPBB3-9596
Diffstat (limited to 'phpBB/viewforum.php')
| -rw-r--r-- | phpBB/viewforum.php | 8 |
1 files changed, 6 insertions, 2 deletions
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', '<img src="' . $url . '" width="1" height="1" alt="cron" />'); + } } // Forum rules and subscription info |
