[feature/system-cron] remove more includes, adjust path

PHPBB3-9596
This commit is contained in:
Igor Wiedler 2010-10-28 21:48:58 +02:00 committed by Oleg Pudeyev
parent c9bd1b392d
commit 5a075c3dca
3 changed files with 3 additions and 6 deletions

View file

@ -242,6 +242,5 @@ foreach ($cache->obtain_hooks() as $hook)
if (!$config['use_system_cron'])
{
include($phpbb_root_path . 'includes/cron/cron_manager.' . $phpEx);
$cron = new cron_manager();
}

View file

@ -15,7 +15,6 @@ define('IN_CRON', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/cron/cron_lock.' . $phpEx);
// Do not update users last page entry
$user->session_begin(false);
@ -64,8 +63,7 @@ if ($config['use_system_cron'])
{
$use_shutdown_function = false;
include($phpbb_root_path . 'includes/cron/cron_manager.' . $phpEx);
$cron = new cron_manager;
$cron = new cron_manager();
}
else
{
@ -75,7 +73,7 @@ else
output_image();
}
$cron_lock = new cron_lock;
$cron_lock = new cron_lock();
if ($cron_lock->lock())
{
if ($config['use_system_cron'])

View file

@ -49,7 +49,7 @@ class cron_manager
{
global $phpbb_root_path, $phpEx;
$tasks_root_path = $phpbb_root_path . 'includes/cron/tasks';
$tasks_root_path = $phpbb_root_path . 'includes/cron/task';
$dir = opendir($tasks_root_path);
$task_dirs = array();
while (($entry = readdir($dir)) !== false)