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/legacy | |
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/legacy')
-rw-r--r-- | lib/private/legacy/app.php | 35 | ||||
-rw-r--r-- | lib/private/legacy/util.php | 1 |
2 files changed, 21 insertions, 15 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index 43830b5fd19..6b5c4f3978c 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -341,21 +341,16 @@ class OC_App { $config = \OC::$server->getConfig(); // Check if app is already downloaded - $installer = new Installer(); + $installer = new Installer( + \OC::$server->getAppFetcher(), + \OC::$server->getHTTPClientService(), + \OC::$server->getTempManager(), + \OC::$server->getLogger() + ); $isDownloaded = $installer->isDownloaded($appId); if(!$isDownloaded) { - $installer->downloadApp( - $appId, - new \OC\App\AppStore\Fetcher\AppFetcher( - \OC::$server->getAppDataDir('appstore'), - \OC::$server->getHTTPClientService(), - \OC::$server->query(\OC\AppFramework\Utility\TimeFactory::class), - $config - ), - \OC::$server->getHTTPClientService(), - \OC::$server->getTempManager() - ); + $installer->downloadApp($appId); } if (!Installer::isInstalled($appId)) { @@ -404,7 +399,13 @@ class OC_App { return false; } - return Installer::removeApp($app); + $installer = new Installer( + \OC::$server->getAppFetcher(), + \OC::$server->getHTTPClientService(), + \OC::$server->getTempManager(), + \OC::$server->getLogger() + ); + return $installer->removeApp($app); } /** @@ -975,7 +976,9 @@ class OC_App { public static function isAppCompatible($ocVersion, $appInfo) { $requireMin = ''; $requireMax = ''; - if (isset($appInfo['dependencies']['owncloud']['@attributes']['min-version'])) { + if (isset($appInfo['dependencies']['nextcloud']['@attributes']['min-version'])) { + $requireMin = $appInfo['dependencies']['nextcloud']['@attributes']['min-version']; + } elseif (isset($appInfo['dependencies']['owncloud']['@attributes']['min-version'])) { $requireMin = $appInfo['dependencies']['owncloud']['@attributes']['min-version']; } else if (isset($appInfo['requiremin'])) { $requireMin = $appInfo['requiremin']; @@ -983,7 +986,9 @@ class OC_App { $requireMin = $appInfo['require']; } - if (isset($appInfo['dependencies']['owncloud']['@attributes']['max-version'])) { + if (isset($appInfo['dependencies']['nextcloud']['@attributes']['max-version'])) { + $requireMax = $appInfo['dependencies']['nextcloud']['@attributes']['max-version']; + } elseif (isset($appInfo['dependencies']['owncloud']['@attributes']['max-version'])) { $requireMax = $appInfo['dependencies']['owncloud']['@attributes']['max-version']; } else if (isset($appInfo['requiremax'])) { $requireMax = $appInfo['requiremax']; diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index e4c2caeafd7..5cd92eaa415 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -757,6 +757,7 @@ class OC_Util { 'simplexml_load_string' => 'SimpleXML', 'hash' => 'HASH Message Digest Framework', 'curl_init' => 'cURL', + 'openssl_verify' => 'OpenSSL', ], 'defined' => array( 'PDO::ATTR_DRIVER_NAME' => 'PDO' |