diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-08-01 18:57:00 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-08-01 18:57:00 +0200 |
commit | cd02b2205e5148e79698f60d0209cf10391e30c8 (patch) | |
tree | c60d4682ea87427ae9c5d4ccd964671ebdbee222 /lib/private/Updater.php | |
parent | 84c22fdeef6986f9038d8563937cc234751d5147 (diff) | |
download | nextcloud-server-cd02b2205e5148e79698f60d0209cf10391e30c8.tar.gz nextcloud-server-cd02b2205e5148e79698f60d0209cf10391e30c8.zip |
Use public methods for OC_App::isShipped
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Updater.php')
-rw-r--r-- | lib/private/Updater.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 6c23a43c354..902d22f6679 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -315,10 +315,11 @@ class Updater extends BasicEmitter { $apps = \OC_App::getEnabledApps(); $this->emit('\OC\Updater', 'appUpgradeCheckBefore'); + $appManager = \OC::$server->getAppManager(); foreach ($apps as $appId) { $info = \OC_App::getAppInfo($appId); $compatible = \OC_App::isAppCompatible($version, $info); - $isShipped = \OC_App::isShipped($appId); + $isShipped = $appManager->isShipped($appId); if ($compatible && $isShipped && \OC_App::shouldUpgrade($appId)) { /** @@ -407,11 +408,12 @@ class Updater extends BasicEmitter { $apps = OC_App::getEnabledApps(); $version = Util::getVersion(); $disabledApps = []; + $appManager = \OC::$server->getAppManager(); foreach ($apps as $app) { // check if the app is compatible with this version of ownCloud $info = OC_App::getAppInfo($app); if(!OC_App::isAppCompatible($version, $info)) { - if (OC_App::isShipped($app)) { + if ($appManager->isShipped($app)) { throw new \UnexpectedValueException('The files of the app "' . $app . '" were not correctly replaced before running the update'); } OC_App::disable($app); @@ -422,7 +424,7 @@ class Updater extends BasicEmitter { continue; } // shipped apps will remain enabled - if (OC_App::isShipped($app)) { + if ($appManager->isShipped($app)) { continue; } // authentication and session apps will remain enabled as well |