fix bug with cron execution for all new RC4 installations as well as those having manually updated.

git-svn-id: file:///svn/phpbb/trunk@8022 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2007-08-12 18:16:01 +00:00
parent ca0139c939
commit 3f9348bdf8
3 changed files with 12 additions and 0 deletions

View file

@ -33,6 +33,12 @@ echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==
// test without flush ;) // test without flush ;)
// flush(); // flush();
//
if (!isset($config['cron_lock']))
{
set_config('cron_lock', '0', true);
}
// make sure cron doesn't run multiple times in parallel // make sure cron doesn't run multiple times in parallel
if ($config['cron_lock']) if ($config['cron_lock'])
{ {

View file

@ -1483,6 +1483,11 @@ if (version_compare($current_version, '3.0.RC4', '<='))
$db->sql_transaction('commit'); $db->sql_transaction('commit');
} }
// Setting this here again because new installations may not have it...
set_config('cron_lock', '0', true);
$no_updates = false;
} }
_write_result($no_updates, $errored, $error_ary); _write_result($no_updates, $errored, $error_ary);

View file

@ -211,6 +211,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_da
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cache_last_gc', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cache_last_gc', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cron_lock', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('database_last_gc', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('database_last_gc', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('last_queue_run', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('last_queue_run', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_user_colour', 'AA0000', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_user_colour', 'AA0000', 1);