aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2011-06-03 16:16:27 +0200
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2011-06-03 16:16:27 +0200
commitebb8186191d46f6b264d09f886d5574761194685 (patch)
treee810c602bf72c387a2171a3cd03078bdda3d86d1 /boot.php
parent9b93bd25218dc0b4a5e477c3a64d6f74a51a9d21 (diff)
parente591ed6b30808cabf1f0c80a356f3fa12ce4aa31 (diff)
downloadvolse-hubzilla-ebb8186191d46f6b264d09f886d5574761194685.tar.gz
volse-hubzilla-ebb8186191d46f6b264d09f886d5574761194685.tar.bz2
volse-hubzilla-ebb8186191d46f6b264d09f886d5574761194685.zip
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php21
1 files changed, 15 insertions, 6 deletions
diff --git a/boot.php b/boot.php
index 0af73c468..798a2ef43 100644
--- a/boot.php
+++ b/boot.php
@@ -6,7 +6,7 @@ ini_set('pcre.backtrack_limit', 250000);
define ( 'FRIENDIKA_VERSION', '2.2.999' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
-define ( 'DB_UPDATE_VERSION', 1059 );
+define ( 'DB_UPDATE_VERSION', 1060 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@@ -481,17 +481,26 @@ function check_config(&$a) {
$stored = intval($build);
$current = intval(DB_UPDATE_VERSION);
if(($stored < $current) && file_exists('update.php')) {
+
// We're reporting a different version than what is currently installed.
// Run any existing update scripts to bring the database up to current.
require_once('update.php');
- for($x = $stored; $x < $current; $x ++) {
- if(function_exists('update_' . $x)) {
- $func = 'update_' . $x;
- $func($a);
+
+ // make sure that boot.php and update.php are the same release, we might be
+ // updating right this very second and the correct version of the update.php
+ // file may not be here yet. This can happen on a very busy site.
+
+ if(DB_UPDATE_VERSION == UPDATE_VERSION) {
+
+ for($x = $stored; $x < $current; $x ++) {
+ if(function_exists('update_' . $x)) {
+ $func = 'update_' . $x;
+ $func($a);
+ }
}
+ set_config('system','build', DB_UPDATE_VERSION);
}
- set_config('system','build', DB_UPDATE_VERSION);
}
}