1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-29 02:59:52 +02:00

[feature/dic] Give all cron tasks a name, change some manager usage

PHPBB3-10739
This commit is contained in:
Igor Wiedler
2012-04-09 14:34:35 +02:00
parent aa0c995ed9
commit 3896ee953f
8 changed files with 61 additions and 23 deletions

View File

@@ -193,10 +193,12 @@ if ($forum_data['forum_topics_per_page'])
// Do the forum Prune thang - cron type job ...
if (!$config['use_system_cron'])
{
$task = $container->get('cron.task.core.prune_forum');
$task = new phpbb_cron_task_wrapper($task);
$cron = $container->get('cron.manager');
$task = $cron->find_task('cron.task.core.prune_forum');
$task->set_forum_data($forum_data);
if ($task && $task->is_ready())
if ($task->is_ready())
{
$url = $task->get_url();
$template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="cron" />');