aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-08-12 18:16:01 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-08-12 18:16:01 +0000
commit3f9348bdf8ccc05f251b85caccaf5a241ae011fc (patch)
treefcdf8e6b0365fb836656ca1e3b33810ea95b0166 /phpBB
parentca0139c939cf6c781a12035cf90ea49446ced5bc (diff)
downloadforums-3f9348bdf8ccc05f251b85caccaf5a241ae011fc.tar
forums-3f9348bdf8ccc05f251b85caccaf5a241ae011fc.tar.gz
forums-3f9348bdf8ccc05f251b85caccaf5a241ae011fc.tar.bz2
forums-3f9348bdf8ccc05f251b85caccaf5a241ae011fc.tar.xz
forums-3f9348bdf8ccc05f251b85caccaf5a241ae011fc.zip
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
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/cron.php6
-rw-r--r--phpBB/install/database_update.php5
-rw-r--r--phpBB/install/schemas/schema_data.sql1
3 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/cron.php b/phpBB/cron.php
index b5a51a1688..79cf0f40fa 100644
--- a/phpBB/cron.php
+++ b/phpBB/cron.php
@@ -33,6 +33,12 @@ echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==
// test without flush ;)
// flush();
+//
+if (!isset($config['cron_lock']))
+{
+ set_config('cron_lock', '0', true);
+}
+
// make sure cron doesn't run multiple times in parallel
if ($config['cron_lock'])
{
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index ba4bf5d170..da8f6e9518 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -1483,6 +1483,11 @@ if (version_compare($current_version, '3.0.RC4', '<='))
$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);
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 4fb2c25bb3..dd4017f19e 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -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, 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 ('last_queue_run', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_user_colour', 'AA0000', 1);