diff options
author | Sem <sembrestels@riseup.net> | 2012-09-05 01:16:45 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-09-05 01:16:45 +0200 |
commit | ba0761b5a0fb7d5dd3c20179de0f49b1aa8e0a89 (patch) | |
tree | 2e1923a1076bb4f08eb2aff6ceecf4c86c941ba5 /actions | |
parent | dce60b43126dcaa38e6845ae45e09db87aa7e229 (diff) | |
download | elgg-ba0761b5a0fb7d5dd3c20179de0f49b1aa8e0a89.tar.gz elgg-ba0761b5a0fb7d5dd3c20179de0f49b1aa8e0a89.tar.bz2 |
Moved upgrade lock/unlock functions to upgrade.php lib.
Diffstat (limited to 'actions')
-rw-r--r-- | actions/admin/site/unlock_upgrade.php | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/actions/admin/site/unlock_upgrade.php b/actions/admin/site/unlock_upgrade.php index b73cf7033..b625b1d26 100644 --- a/actions/admin/site/unlock_upgrade.php +++ b/actions/admin/site/unlock_upgrade.php @@ -3,21 +3,8 @@ * Unlocks the upgrade script */ -// @todo Move this in ElggUpgradeManager::isLocked() when #4682 fixed -global $CONFIG, $DB_QUERY_CACHE; - -$is_locked = count(get_data("show tables like '{$CONFIG->dbprefix}locked'")); - -// Invalidate query cache -if ($DB_QUERY_CACHE) { - $DB_QUERY_CACHE->clear(); - elgg_log("Query cache invalidated", 'NOTICE'); -} - -if ($is_locked) { - // @todo Move to ElggUpgradeManager::unlock() when #4682 fixed. - delete_data("drop table {$CONFIG->dbprefix}locked"); - error_log('Upgrade unlocks itself'); +if (_elgg_upgrade_is_locked()) { + _elgg_upgrade_unlock(); } system_message(elgg_echo('upgrade:unlock:success')); -forward(REFERER);
\ No newline at end of file +forward(REFERER); |