1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[feature/system-cron] Reformatted cron, includes/cron and includes/cron_lock.

PHPBB3-9596
This commit is contained in:
Oleg Pudeyev
2010-04-15 10:11:40 -04:00
parent 3956e9f533
commit 61e0285da8
3 changed files with 99 additions and 57 deletions

View File

@@ -24,9 +24,10 @@ class cron_lock
{
private $cron_id;
function lock() {
function lock()
{
global $config, $db;
if (!isset($config['cron_lock']))
{
set_config('cron_lock', '0', true);
@@ -58,11 +59,12 @@ class cron_lock
{
return false;
}
return true;
}
function unlock() {
function unlock()
{
global $db;
$sql = 'UPDATE ' . CONFIG_TABLE . "