]> source.dussan.org Git - nextcloud-server.git/commitdiff
Adjust previous fallbacks
authorLukas Reschke <lukas@statuscode.ch>
Tue, 15 Nov 2016 14:07:58 +0000 (15:07 +0100)
committerLukas Reschke <lukas@statuscode.ch>
Tue, 15 Nov 2016 14:07:58 +0000 (15:07 +0100)
11.0 is 11 and not 9.2 anymore

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
lib/private/App/DependencyAnalyzer.php
settings/Controller/AppSettingsController.php
tests/lib/App/DependencyAnalyzerTest.php

index c24b25ff14da8e2a1b2f1796c1533e7563d71503..84d87efa3d32f7584d0a7b9b8474ad9f20f329fc 100644 (file)
@@ -336,13 +336,9 @@ class DependencyAnalyzer {
                switch ($version) {
                        case '9.1':
                                return '10';
-                       case '9.2':
-                               return '11';
                        default:
                                if (strpos($version, '9.1.') === 0) {
                                        $version = '10.0.' . substr($version, 4);
-                               } else if (strpos($version, '9.2.') === 0) {
-                                       $version = '11.0.' . substr($version, 4);
                                }
                                return $version;
                }
index 8164dd1fcfa80cbcea48b56254361e5d469d3c5a..b668c5cfb38b8af823c452de64efd09b5f9c133d 100644 (file)
@@ -169,10 +169,10 @@ class AppSettingsController extends Controller {
                        $nextCloudVersion = $versionParser->getVersion($app['releases'][0]['rawPlatformVersionSpec']);
                        $nextCloudVersionDependencies = [];
                        if($nextCloudVersion->getMinimumVersion() !== '') {
-                               $nextCloudVersionDependencies['owncloud']['@attributes']['min-version'] = $nextCloudVersion->getMinimumVersion();
+                               $nextCloudVersionDependencies['nextcloud']['@attributes']['min-version'] = $nextCloudVersion->getMinimumVersion();
                        }
                        if($nextCloudVersion->getMaximumVersion() !== '') {
-                               $nextCloudVersionDependencies['owncloud']['@attributes']['max-version'] = $nextCloudVersion->getMaximumVersion();
+                               $nextCloudVersionDependencies['nextcloud']['@attributes']['max-version'] = $nextCloudVersion->getMaximumVersion();
                        }
                        $phpVersion = $versionParser->getVersion($app['releases'][0]['rawPhpVersionSpec']);
                        $existsLocally = (\OC_App::getAppPath($app['id']) !== false) ? true : false;
@@ -331,8 +331,8 @@ class AppSettingsController extends Controller {
                        $app['canInstall'] = empty($missing);
                        $app['missingDependencies'] = $missing;
 
-                       $app['missingMinOwnCloudVersion'] = !isset($app['dependencies']['owncloud']['@attributes']['min-version']);
-                       $app['missingMaxOwnCloudVersion'] = !isset($app['dependencies']['owncloud']['@attributes']['max-version']);
+                       $app['missingMinOwnCloudVersion'] = !isset($app['dependencies']['nextcloud']['@attributes']['min-version']);
+                       $app['missingMaxOwnCloudVersion'] = !isset($app['dependencies']['nextcloud']['@attributes']['max-version']);
 
                        return $app;
                }, $apps);
index fd44954eaf4aef15f1ea7aea5c9a39a704e495f2..65b45a002d496fa2730119ada4367bbfcc72b2d4 100644 (file)
@@ -295,7 +295,7 @@ class DependencyAnalyzerTest extends TestCase {
                        ],
                        [
                                [
-                                       'Server version 11 or higher is required.',
+                                       'Server version 9.2 or higher is required.',
                                ],
                                [
                                        'nextcloud' => [
@@ -305,6 +305,18 @@ class DependencyAnalyzerTest extends TestCase {
                                        ],
                                ],
                        ],
+                       [
+                               [
+                                       'Server version 11 or higher is required.',
+                               ],
+                               [
+                                       'nextcloud' => [
+                                               '@attributes' => [
+                                                       'min-version' => '11',
+                                               ],
+                                       ],
+                               ],
+                       ],
                        [
                                [
                                        'Server version 8.0.1 or lower is required.',
@@ -388,7 +400,7 @@ class DependencyAnalyzerTest extends TestCase {
                        ],
                        [
                                [
-                                       'Server version 11 or higher is required.',
+                                       'Server version 9.2 or higher is required.',
                                ],
                                [
                                        'owncloud' => [