mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-10 18:54:08 +02:00
[feature/system-cron] Changed include_once to *_exists/include.
PHPBB3-9596
This commit is contained in:
@@ -16,7 +16,10 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
if (!class_exists('cron_task_base'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prune all forums cron task.
|
||||
|
@@ -16,7 +16,10 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
if (!class_exists('cron_task_base'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prune one forum cron task.
|
||||
@@ -60,7 +63,10 @@ class cron_task_core_prune_forum extends cron_task_base implements parametrized_
|
||||
public function run()
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
if (!function_exists('auto_prune'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
|
||||
if ($this->forum_data['prune_days'])
|
||||
{
|
||||
|
@@ -16,7 +16,10 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
if (!class_exists('cron_task_base'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Queue cron task. Sends email and jabber messages queued by other scripts.
|
||||
@@ -31,7 +34,10 @@ class cron_task_core_queue extends cron_task_base
|
||||
public function run()
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
if (!class_exists('queue'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
}
|
||||
$queue = new queue();
|
||||
$queue->process();
|
||||
}
|
||||
|
@@ -16,7 +16,10 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
if (!class_exists('cron_task_base'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tidy cache cron task.
|
||||
|
@@ -16,7 +16,10 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
if (!class_exists('cron_task_base'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tidy database cron task.
|
||||
@@ -30,7 +33,10 @@ class cron_task_core_tidy_database extends cron_task_base
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
if (!function_exists('tidy_database'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
tidy_database();
|
||||
}
|
||||
|
||||
|
@@ -16,7 +16,10 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
if (!class_exists('cron_task_base'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tidy search cron task.
|
||||
@@ -37,7 +40,10 @@ class cron_task_core_tidy_sessions extends cron_task_base
|
||||
// Select the search method
|
||||
$search_type = basename($config['search_type']);
|
||||
|
||||
include_once("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
include("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
}
|
||||
|
||||
// We do some additional checks in the module to ensure it can actually be utilised
|
||||
$error = false;
|
||||
|
@@ -16,7 +16,10 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
if (!class_exists('cron_task_base'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tidy sessions cron task.
|
||||
|
@@ -16,7 +16,10 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
if (!class_exists('cron_task_base'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tidy warnings cron task.
|
||||
@@ -33,7 +36,10 @@ class cron_task_core_tidy_warnings extends cron_task_base
|
||||
public function run()
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
if (!function_exists('tidy_warnings'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
tidy_warnings();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user