diff options
| author | Igor Wiedler <igor@wiedler.ch> | 2011-02-13 15:54:42 +0100 |
|---|---|---|
| committer | Igor Wiedler <igor@wiedler.ch> | 2011-02-13 15:54:42 +0100 |
| commit | 04bd2e640e771948671ab6554df8962de980f511 (patch) | |
| tree | d1e5a226ca875e940d1d98c710051d1911d8b2ad /phpBB/viewforum.php | |
| parent | 8f0e9aee5ce518937b7ed05c2cd602e85e5b0b8a (diff) | |
| parent | 1fd8d6de7f6bb41505530c83e487a9dc18bd25af (diff) | |
| download | forums-04bd2e640e771948671ab6554df8962de980f511.tar forums-04bd2e640e771948671ab6554df8962de980f511.tar.gz forums-04bd2e640e771948671ab6554df8962de980f511.tar.bz2 forums-04bd2e640e771948671ab6554df8962de980f511.tar.xz forums-04bd2e640e771948671ab6554df8962de980f511.zip | |
Merge branch 'feature/system-cron' into develop
* feature/system-cron: (67 commits)
[feature/system-cron] More tests for cron manager.
[feature/system-cron] Added documentation for cron manager constructor.
[feature/system-cron] Remove an unecessary assignment and an unecessary comment
[feature/system-cron] Clarify comments about flush() call in cron.
[feature/system-cron] preg_match returns int so cast to bool, fix comment
[feature/system-cron] Rename lock() to acquire and unlock() to release.
[feature/system-cron] Cache cron's task names.
[feature/system-cron] Use a RecursiveDirectoryIterator instead of readdir.
[feature/system-cron] Add array type hints if appropriate and remove globals.
[feature/system-cron] Make use of the new config class in locks.
[feature/system-cron] Fix duplicate instantiation of class loader in tests.
[feature/system-cron] Abstract the database locking mechanism out of cron.
[feature/system-cron] Move tests to phpunit.xml and always load class loader
[feature/system-cron] Basic tests for cron manager.
[feature/system-cron] Added @param/@return documentation
[feature/system-cron] Add phpDoc documentation for everything else.
[feature/system-cron] Cast result in cron_manager::is_valid_name() to bool.
[feature/system-cron] Add phpDoc documentation for phpbb_cron_manager class.
[feature/system-cron] Add phpDoc documentation for phpbb_cron_lock class.
[feature/system-cron] Adjust SQL query style to follow coding guidelines.
...
Diffstat (limited to 'phpBB/viewforum.php')
| -rw-r--r-- | phpBB/viewforum.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 47d71849cb..2672703042 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -193,9 +193,14 @@ if ($forum_data['forum_topics_per_page']) } // Do the forum Prune thang - cron type job ... -if ($forum_data['prune_next'] < time() && $forum_data['enable_prune']) +if (!$config['use_system_cron']) { - $template->assign_var('RUN_CRON_TASK', '<img src="' . append_sid($phpbb_root_path . 'cron.' . $phpEx, 'cron_type=prune_forum&f=' . $forum_id) . '" alt="cron" width="1" height="1" />'); + $task = $cron->instantiate_task('cron_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 |
