mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-19 01:38:54 +00:00
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [ticket/12576] Retrieve the cron_manager in cron.php if needed [ticket/12576] Remove cron from common.php
This commit is contained in:
commit
c3639a4d5f
3 changed files with 5 additions and 11 deletions
|
@ -108,11 +108,6 @@ foreach ($phpbb_hook_finder->find() as $hook)
|
||||||
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
|
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$config['use_system_cron'])
|
|
||||||
{
|
|
||||||
$cron = $phpbb_container->get('cron.manager');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main event which is triggered on every page
|
* Main event which is triggered on every page
|
||||||
*
|
*
|
||||||
|
|
|
@ -59,11 +59,7 @@ function do_cron($cron_lock, $run_tasks)
|
||||||
//
|
//
|
||||||
// If DEBUG is defined and cron lock cannot be obtained, a message will be printed.
|
// If DEBUG is defined and cron lock cannot be obtained, a message will be printed.
|
||||||
|
|
||||||
if ($config['use_system_cron'])
|
if (!$config['use_system_cron'])
|
||||||
{
|
|
||||||
$cron = $phpbb_container->get('cron.manager');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$cron_type = request_var('cron_type', '');
|
$cron_type = request_var('cron_type', '');
|
||||||
|
|
||||||
|
@ -74,6 +70,8 @@ else
|
||||||
$cron_lock = $phpbb_container->get('cron.lock_db');
|
$cron_lock = $phpbb_container->get('cron.lock_db');
|
||||||
if ($cron_lock->acquire())
|
if ($cron_lock->acquire())
|
||||||
{
|
{
|
||||||
|
$cron = $phpbb_container->get('cron.manager');
|
||||||
|
|
||||||
if ($config['use_system_cron'])
|
if ($config['use_system_cron'])
|
||||||
{
|
{
|
||||||
$run_tasks = $cron->find_all_ready_tasks();
|
$run_tasks = $cron->find_all_ready_tasks();
|
||||||
|
|
|
@ -5116,7 +5116,8 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
|
||||||
// Call cron job?
|
// Call cron job?
|
||||||
if ($call_cron)
|
if ($call_cron)
|
||||||
{
|
{
|
||||||
global $cron;
|
global $phpbb_container;
|
||||||
|
$cron = $phpbb_container->get('cron.manager');
|
||||||
$task = $cron->find_one_ready_task();
|
$task = $cron->find_one_ready_task();
|
||||||
|
|
||||||
if ($task)
|
if ($task)
|
||||||
|
|
Loading…
Add table
Reference in a new issue