diff options
Diffstat (limited to 'phpBB/common.php')
-rw-r--r-- | phpBB/common.php | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/phpBB/common.php b/phpBB/common.php index 17a2ca10a1..b845460e16 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -36,6 +36,12 @@ if (@ini_get('register_globals')) } } +if (defined('IN_CRON')) +{ + chdir($phpbb_root_path); + $phpbb_root_path = getcwd() . '/'; +} + require($phpbb_root_path . 'config.'.$phpEx); if (!defined('PHPBB_INSTALLED')) @@ -291,24 +297,6 @@ else unset($cached_config); } -// Tidy the cache -if (method_exists($cache, 'tidy') && time() - $config['cache_gc'] > $config['cache_last_gc']) -{ - $cache->tidy(); - set_config('cache_last_gc', time(), TRUE); -} - -// Handle email/cron queue. -if (time() - $config['queue_interval'] >= $config['last_queue_run'] && !defined('IN_ADMIN')) -{ - if (file_exists($phpbb_root_path . 'cache/queue.' . $phpEx)) - { - include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx); - $queue = new queue(); - $queue->process(); - } -} - // Warn about install/ directory if (file_exists('install')) { |