From fbf1578f27563ecf18b2174d53d5f1141a11daa7 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Tue, 18 Feb 2014 18:01:13 +1300 Subject: [PATCH] fix update on cli from 2.0.3 to 2.1-rc1 does not work --- plugins/CoreUpdater/CoreUpdater.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/CoreUpdater/CoreUpdater.php b/plugins/CoreUpdater/CoreUpdater.php index c11e83d0706..3404dc0bfea 100644 --- a/plugins/CoreUpdater/CoreUpdater.php +++ b/plugins/CoreUpdater/CoreUpdater.php @@ -41,9 +41,15 @@ public static function updateComponents(Updater $updater, $componentsWithUpdateF $errors = array(); $deactivatedPlugins = array(); $coreError = false; - + if (!empty($componentsWithUpdateFile)) { - + $currentAccess = Access::getInstance(); + $hasSuperUserAccess = $currentAccess->hasSuperUserAccess(); + + if (!$hasSuperUserAccess) { + $currentAccess->setSuperUserAccess(true); + } + // if error in any core update, show message + help message + EXIT // if errors in any plugins updates, show them on screen, disable plugins that errored + CONTINUE // if warning in any core update or in any plugins update, show message + CONTINUE @@ -62,6 +68,10 @@ public static function updateComponents(Updater $updater, $componentsWithUpdateF } } } + + if (!$hasSuperUserAccess) { + $currentAccess->setSuperUserAccess(false); + } } Filesystem::deleteAllCacheOnUpdate();