diff options
Diffstat (limited to 'actions/admin')
-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); |