mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 16:27:38 +02:00
[ticket/12576] Retrieve the cron_manager in cron.php if needed
PHPBB3-12576
This commit is contained in:
@@ -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();
|
||||||
|
Reference in New Issue
Block a user