aboutsummaryrefslogtreecommitdiff
path: root/upgrade.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2012-12-16 17:26:03 -0500
committerBrett Profitt <brett.profitt@gmail.com>2012-12-16 17:26:03 -0500
commit22e8d9be4582b78a500382e14046a653a14e3f43 (patch)
treef1c87208494bc243d510c8daf8c11beb6b1fcabe /upgrade.php
parentba0761b5a0fb7d5dd3c20179de0f49b1aa8e0a89 (diff)
downloadelgg-22e8d9be4582b78a500382e14046a653a14e3f43.tar.gz
elgg-22e8d9be4582b78a500382e14046a653a14e3f43.tar.bz2
Refs #4643. Cleanup for the upgrade lock.
Diffstat (limited to 'upgrade.php')
-rw-r--r--upgrade.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/upgrade.php b/upgrade.php
index a58fcdc96..c5f158c61 100644
--- a/upgrade.php
+++ b/upgrade.php
@@ -9,6 +9,8 @@
* new version of the script. Deleting the script is not a requirement and
* leaving it behind does not affect the security of the site.
*
+ * Upgrades use a table {db_prefix}upgrade_lock as a mutex to prevent concurrent upgrades.
+ *
* @package Elgg.Core
* @subpackage Upgrade
*/
@@ -20,9 +22,9 @@ define('UPGRADING', 'upgrading');
require_once(dirname(__FILE__) . "/engine/start.php");
if (get_input('upgrade') == 'upgrade') {
-
// prevent someone from running the upgrade script in parallel (see #4643)
if (!_elgg_upgrade_lock()) {
+ register_error(elgg_echo('upgrade:locked'));
forward();
}
@@ -40,7 +42,6 @@ if (get_input('upgrade') == 'upgrade') {
elgg_invalidate_simplecache();
elgg_reset_system_cache();
- // critical region has past
_elgg_upgrade_unlock();
} else {