diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-11-09 11:10:37 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-11-09 11:10:37 +0100 |
commit | fe04451cb1fdda99b79798d21f0a229f99224250 (patch) | |
tree | e49786d1a9e128dfb84d81a6cf0d48495563f902 /lib | |
parent | 113f9f80f3f5a96afdcb71f4f76e3cee22e8dc58 (diff) | |
download | nextcloud-server-fe04451cb1fdda99b79798d21f0a229f99224250.tar.gz nextcloud-server-fe04451cb1fdda99b79798d21f0a229f99224250.zip |
Do not allow two different version requirements
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/app/codechecker/infochecker.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/private/app/codechecker/infochecker.php b/lib/private/app/codechecker/infochecker.php index 91580bde07d..24835d8148f 100644 --- a/lib/private/app/codechecker/infochecker.php +++ b/lib/private/app/codechecker/infochecker.php @@ -77,6 +77,21 @@ class InfoChecker extends BasicEmitter { $info = $this->infoParser->parse($appPath . '/appinfo/info.xml'); + if (isset($info['dependencies']['owncloud']['@attributes']['min-version']) && ($info['requiremin'] || $info['require'])) { + $this->emit('InfoChecker', 'duplicateRequirement', ['min']); + $errors[] = [ + 'type' => 'duplicateRequirement', + 'field' => 'min', + ]; + } + if (isset($info['dependencies']['owncloud']['@attributes']['max-version']) && $info['requiremax']) { + $this->emit('InfoChecker', 'duplicateRequirement', ['max']); + $errors[] = [ + 'type' => 'duplicateRequirement', + 'field' => 'max', + ]; + } + foreach ($info as $key => $value) { if(is_array($value)) { $value = json_encode($value); |