summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-12-05 23:26:32 +0100
committerGitHub <noreply@github.com>2016-12-05 23:26:32 +0100
commit572b078de7e139de748ea829876b4b1b04b306bb (patch)
tree6add143c45f5a994427d57452f393da4244a0eb6
parenta89b033869db08f1ad3483a5ab3fe774e898fa0f (diff)
parent60d1e8e63e685a33697cccceb0517db8ca87644f (diff)
downloadnextcloud-server-572b078de7e139de748ea829876b4b1b04b306bb.tar.gz
nextcloud-server-572b078de7e139de748ea829876b4b1b04b306bb.zip
Merge pull request #2520 from nextcloud/replace-string
Check for nextcloud version as well
-rw-r--r--core/Command/App/CheckCode.php2
-rw-r--r--lib/private/App/CodeChecker/InfoChecker.php10
2 files changed, 9 insertions, 3 deletions
diff --git a/core/Command/App/CheckCode.php b/core/Command/App/CheckCode.php
index bd1bac247a2..aa618b26cec 100644
--- a/core/Command/App/CheckCode.php
+++ b/core/Command/App/CheckCode.php
@@ -135,7 +135,7 @@ class CheckCode extends Command implements CompletionAwareInterface {
});
$infoChecker->listen('InfoChecker', 'missingRequirement', function($minMax) use ($output) {
- $output->writeln("<comment>ownCloud $minMax version requirement missing (will be an error in ownCloud 11 and later)</comment>");
+ $output->writeln("<comment>Nextcloud $minMax version requirement missing (will be an error in Nextcloud 12 and later)</comment>");
});
$infoChecker->listen('InfoChecker', 'duplicateRequirement', function($minMax) use ($output) {
diff --git a/lib/private/App/CodeChecker/InfoChecker.php b/lib/private/App/CodeChecker/InfoChecker.php
index 77bf7e8182d..1e617e3aeec 100644
--- a/lib/private/App/CodeChecker/InfoChecker.php
+++ b/lib/private/App/CodeChecker/InfoChecker.php
@@ -86,7 +86,10 @@ class InfoChecker extends BasicEmitter {
'type' => 'duplicateRequirement',
'field' => 'min',
];
- } else if (!isset($info['dependencies']['owncloud']['@attributes']['min-version'])) {
+ } else if (
+ !isset($info['dependencies']['owncloud']['@attributes']['min-version']) &&
+ !isset($info['dependencies']['nextcloud']['@attributes']['min-version'])
+ ) {
$this->emit('InfoChecker', 'missingRequirement', ['min']);
}
@@ -96,7 +99,10 @@ class InfoChecker extends BasicEmitter {
'type' => 'duplicateRequirement',
'field' => 'max',
];
- } else if (!isset($info['dependencies']['owncloud']['@attributes']['max-version'])) {
+ } else if (
+ !isset($info['dependencies']['owncloud']['@attributes']['max-version']) &&
+ !isset($info['dependencies']['nextcloud']['@attributes']['max-version'])
+ ) {
$this->emit('InfoChecker', 'missingRequirement', ['max']);
}