Skip to content

Commit

Permalink
fix update on cli from 2.0.3 to 2.1-rc1 does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Feb 18, 2014
1 parent bc7fd6f commit fbf1578
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions plugins/CoreUpdater/CoreUpdater.php
Expand Up @@ -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
Expand All @@ -62,6 +68,10 @@ public static function updateComponents(Updater $updater, $componentsWithUpdateF
}
}
}

if (!$hasSuperUserAccess) {
$currentAccess->setSuperUserAccess(false);
}
}

Filesystem::deleteAllCacheOnUpdate();
Expand Down

0 comments on commit fbf1578

Please sign in to comment.