1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 13:30:25 +02:00

- new queue invocation method

git-svn-id: file:///svn/phpbb/trunk@5136 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2005-04-30 14:28:07 +00:00
parent 0dec4135c5
commit 15c0535cbc
5 changed files with 145 additions and 21 deletions

View File

@@ -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'))
{