diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-10 11:04:12 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-10 17:24:14 +0100 |
commit | 8b165c5ed59659fce5884c2091774b33b6b857d8 (patch) | |
tree | 138be5c9f0c17c74491dc2e066cdb699a2cdd5a9 /lib/private | |
parent | 9a2c517ca8eaf25bf142696e1479355112b1f108 (diff) | |
download | nextcloud-server-8b165c5ed59659fce5884c2091774b33b6b857d8.tar.gz nextcloud-server-8b165c5ed59659fce5884c2091774b33b6b857d8.zip |
No longer evaluate appinfo/version
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/app.php | 11 | ||||
-rw-r--r-- | lib/private/app/appmanager.php | 3 | ||||
-rw-r--r-- | lib/private/installer.php | 9 |
3 files changed, 5 insertions, 18 deletions
diff --git a/lib/private/app.php b/lib/private/app.php index 2abc015a91f..3df3a0e5bac 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -564,7 +564,7 @@ class OC_App { } /** - * get the last version of the app, either from appinfo/version or from appinfo/info.xml + * get the last version of the app from appinfo/info.xml * * @param string $appId * @return string @@ -584,14 +584,9 @@ class OC_App { * @return string */ public static function getAppVersionByPath($path) { - $versionFile = $path . '/appinfo/version'; $infoFile = $path . '/appinfo/info.xml'; - if (is_file($versionFile)) { - return trim(file_get_contents($versionFile)); - } else { - $appData = self::getAppInfo($infoFile, true); - return isset($appData['version']) ? $appData['version'] : ''; - } + $appData = self::getAppInfo($infoFile, true); + return isset($appData['version']) ? $appData['version'] : ''; } diff --git a/lib/private/app/appmanager.php b/lib/private/app/appmanager.php index eeb2216d5a8..4855f6f0185 100644 --- a/lib/private/app/appmanager.php +++ b/lib/private/app/appmanager.php @@ -297,9 +297,6 @@ class AppManager implements IAppManager { /** * Returns the app information from "appinfo/info.xml". * - * If no version was present in "appinfo/info.xml", reads it - * from the external "appinfo/version" file instead. - * * @param string $appId app id * * @return array app iinfo diff --git a/lib/private/installer.php b/lib/private/installer.php index f30db9ca659..1e4bb968929 100644 --- a/lib/private/installer.php +++ b/lib/private/installer.php @@ -390,16 +390,11 @@ class OC_Installer{ } // check if the ocs version is the same as the version in info.xml/version - $versionFile= $extractDir.'/appinfo/version'; - if(is_file($versionFile)) { - $version = trim(file_get_contents($versionFile)); - }else{ - $version = trim($info['version']); - } + $version = trim($info['version']); if(isset($data['appdata']['version']) && $version<>trim($data['appdata']['version'])) { OC_Helper::rmdirr($extractDir); - throw new \Exception($l->t("App can't be installed because the version in info.xml/version is not the same as the version reported from the app store")); + throw new \Exception($l->t("App can't be installed because the version in info.xml is not the same as the version reported from the app store")); } return $info; |