diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-10-31 11:07:54 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-10-31 17:17:47 +0100 |
commit | 8acb54aa0b32a8b750f8ab3aba9f63aa931be7d1 (patch) | |
tree | af744fe68adce931a8bb1b5918c93210b828124e /lib/private/Updater.php | |
parent | df7fd2b57cb211b3a6a9febdca4ab0a21baed19d (diff) | |
download | nextcloud-server-8acb54aa0b32a8b750f8ab3aba9f63aa931be7d1.tar.gz nextcloud-server-8acb54aa0b32a8b750f8ab3aba9f63aa931be7d1.zip |
Add update support
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/Updater.php')
-rw-r--r-- | lib/private/Updater.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 646fc031a83..cd2934f7196 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -1,6 +1,7 @@ <?php /** * @copyright Copyright (c) 2016, ownCloud, Inc. + * @copyright Copyright (c) 2016, Lukas Reschke <lukas@statuscode.ch> * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Frank Karlitschek <frank@karlitschek.de> @@ -426,11 +427,15 @@ class Updater extends BasicEmitter { private function upgradeAppStoreApps(array $disabledApps) { foreach($disabledApps as $app) { try { - if (Installer::isUpdateAvailable($app)) { - $ocsId = \OC::$server->getConfig()->getAppValue($app, 'ocsid', ''); - - $this->emit('\OC\Updater', 'upgradeAppStoreApp', array($app)); - Installer::updateAppByOCSId($ocsId); + $installer = new Installer( + \OC::$server->getAppFetcher(), + \OC::$server->getHTTPClientService(), + \OC::$server->getTempManager(), + $this->log + ); + if (Installer::isUpdateAvailable($app, \OC::$server->getAppFetcher())) { + $this->emit('\OC\Updater', 'upgradeAppStoreApp', [$app]); + $installer->updateAppstoreApp($app); } } catch (\Exception $ex) { $this->log->logException($ex, ['app' => 'core']); |