Merge pull request #21506 from owncloud/issue-20218-min-max-owncloud-version-warning
Issue 20218 min max owncloud version warning
This commit is contained in:
commit
46107f82d4
14 changed files with 38 additions and 21 deletions
|
@ -6,8 +6,6 @@
|
|||
<licence>AGPL</licence>
|
||||
<author>owncloud.org</author>
|
||||
<version>0.1.3</version>
|
||||
<requiremin>9.0</requiremin>
|
||||
<shipped>true</shipped>
|
||||
<standalone/>
|
||||
<default_enable/>
|
||||
<types>
|
||||
|
@ -21,4 +19,7 @@
|
|||
<public>
|
||||
<webdav>appinfo/v1/publicwebdav.php</webdav>
|
||||
</public>
|
||||
<dependencies>
|
||||
<owncloud min-version="9.0" max-version="9.0" />
|
||||
</dependencies>
|
||||
</info>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<name>Default encryption module</name>
|
||||
<license>AGPL</license>
|
||||
<author>Bjoern Schiessle, Clark Tomlinson</author>
|
||||
<shipped>true</shipped>
|
||||
<documentation>
|
||||
<user>user-encryption</user>
|
||||
<admin>admin-encryption</admin>
|
||||
|
@ -26,7 +25,7 @@
|
|||
</types>
|
||||
<dependencies>
|
||||
<lib>openssl</lib>
|
||||
<owncloud min-version="9.0" />
|
||||
<owncloud min-version="9.0" max-version="9.0" />
|
||||
</dependencies>
|
||||
|
||||
</info>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<version>0.0.1</version>
|
||||
<namespace>Federation</namespace>
|
||||
<category>other</category>
|
||||
<dependencies>
|
||||
<owncloud min-version="9.0" />
|
||||
</dependencies>
|
||||
<dependencies>
|
||||
<owncloud min-version="9.0" max-version="9.0" />
|
||||
</dependencies>
|
||||
</info>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
<description>File Management</description>
|
||||
<licence>AGPL</licence>
|
||||
<author>Robin Appelman, Vincent Petry</author>
|
||||
<shipped>true</shipped>
|
||||
<standalone/>
|
||||
<default_enable/>
|
||||
<version>1.4.1</version>
|
||||
|
@ -13,7 +12,7 @@
|
|||
<filesystem/>
|
||||
</types>
|
||||
<dependencies>
|
||||
<owncloud min-version="9.0" />
|
||||
<owncloud min-version="9.0" max-version="9.0" />
|
||||
</dependencies>
|
||||
<documentation>
|
||||
<user>user-files</user>
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
</description>
|
||||
<licence>AGPL</licence>
|
||||
<author>Robin Appelman, Michael Gapczynski, Vincent Petry</author>
|
||||
<shipped>true</shipped>
|
||||
<documentation>
|
||||
<admin>admin-external-storage</admin>
|
||||
</documentation>
|
||||
|
@ -21,6 +20,6 @@
|
|||
<ocsid>166048</ocsid>
|
||||
|
||||
<dependencies>
|
||||
<owncloud min-version="9.0" />
|
||||
<owncloud min-version="9.0" max-version="9.0" />
|
||||
</dependencies>
|
||||
</info>
|
||||
|
|
|
@ -9,14 +9,13 @@ Turning the feature off removes shared files and folders on the server for all s
|
|||
</description>
|
||||
<licence>AGPL</licence>
|
||||
<author>Michael Gapczynski, Bjoern Schiessle</author>
|
||||
<shipped>true</shipped>
|
||||
<default_enable/>
|
||||
<version>0.8.1</version>
|
||||
<types>
|
||||
<filesystem/>
|
||||
</types>
|
||||
<dependencies>
|
||||
<owncloud min-version="9.0" />
|
||||
<owncloud min-version="9.0" max-version="9.0" />
|
||||
</dependencies>
|
||||
<public>
|
||||
<files>public.php</files>
|
||||
|
|
|
@ -9,14 +9,13 @@ To prevent a user from running out of disk space, the ownCloud Deleted files app
|
|||
</description>
|
||||
<licence>AGPL</licence>
|
||||
<author>Bjoern Schiessle</author>
|
||||
<shipped>true</shipped>
|
||||
<default_enable/>
|
||||
<version>0.8.0</version>
|
||||
<types>
|
||||
<filesystem/>
|
||||
</types>
|
||||
<dependencies>
|
||||
<owncloud min-version="9.0" />
|
||||
<owncloud min-version="9.0" max-version="9.0" />
|
||||
</dependencies>
|
||||
<documentation>
|
||||
<user>user-trashbin</user>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<name>Versions</name>
|
||||
<licence>AGPL</licence>
|
||||
<author>Frank Karlitschek, Bjoern Schiessle</author>
|
||||
<shipped>true</shipped>
|
||||
<description>
|
||||
This application enables ownCloud to automatically maintain older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user’s directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. ownCloud then automatically manages the versions folder to ensure the user doesn’t run out of Quota because of versions.
|
||||
In addition to the expiry of versions, ownCloud’s versions app makes certain never to use more than 50% of the user’s currently available free space. If stored versions exceed this limit, ownCloud will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation.
|
||||
|
@ -15,7 +14,7 @@ In addition to the expiry of versions, ownCloud’s versions app makes certain n
|
|||
<filesystem/>
|
||||
</types>
|
||||
<dependencies>
|
||||
<owncloud min-version="9.0" />
|
||||
<owncloud min-version="9.0" max-version="9.0" />
|
||||
</dependencies>
|
||||
<documentation>
|
||||
<user>user-versions</user>
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
</description>
|
||||
<licence>AGPL</licence>
|
||||
<author>Tom Needham</author>
|
||||
<shipped>true</shipped>
|
||||
<default_enable/>
|
||||
<documentation>
|
||||
<admin>admin-provisioning-api</admin>
|
||||
|
@ -24,6 +23,6 @@
|
|||
<filesystem/>
|
||||
</types>
|
||||
<dependencies>
|
||||
<owncloud min-version="9.0" />
|
||||
<owncloud min-version="9.0" max-version="9.0" />
|
||||
</dependencies>
|
||||
</info>
|
||||
|
|
|
@ -9,7 +9,6 @@ A user logs into ownCloud with their LDAP or AD credentials, and is granted acce
|
|||
</description>
|
||||
<licence>AGPL</licence>
|
||||
<author>Dominik Schmidt and Arthur Schiwon</author>
|
||||
<shipped>true</shipped>
|
||||
<version>0.8.0</version>
|
||||
<types>
|
||||
<authentication/>
|
||||
|
@ -19,6 +18,6 @@ A user logs into ownCloud with their LDAP or AD credentials, and is granted acce
|
|||
</documentation>
|
||||
<dependencies>
|
||||
<lib>ldap</lib>
|
||||
<owncloud min-version="9.0" />
|
||||
<owncloud min-version="9.0" max-version="9.0" />
|
||||
</dependencies>
|
||||
</info>
|
||||
|
|
|
@ -131,6 +131,10 @@ class CheckCode extends Command {
|
|||
}
|
||||
});
|
||||
|
||||
$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>");
|
||||
});
|
||||
|
||||
$infoChecker->listen('InfoChecker', 'duplicateRequirement', function($minMax) use ($output) {
|
||||
$output->writeln("<error>Duplicate $minMax ownCloud version requirement found</error>");
|
||||
});
|
||||
|
|
|
@ -83,13 +83,18 @@ class InfoChecker extends BasicEmitter {
|
|||
'type' => 'duplicateRequirement',
|
||||
'field' => 'min',
|
||||
];
|
||||
} else if (!isset($info['dependencies']['owncloud']['@attributes']['min-version'])) {
|
||||
$this->emit('InfoChecker', 'missingRequirement', ['min']);
|
||||
}
|
||||
|
||||
if (isset($info['dependencies']['owncloud']['@attributes']['max-version']) && $info['requiremax']) {
|
||||
$this->emit('InfoChecker', 'duplicateRequirement', ['max']);
|
||||
$errors[] = [
|
||||
'type' => 'duplicateRequirement',
|
||||
'field' => 'max',
|
||||
];
|
||||
} else if (!isset($info['dependencies']['owncloud']['@attributes']['max-version'])) {
|
||||
$this->emit('InfoChecker', 'missingRequirement', ['max']);
|
||||
}
|
||||
|
||||
foreach ($info as $key => $value) {
|
||||
|
|
|
@ -296,6 +296,9 @@ 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']);
|
||||
|
||||
return $app;
|
||||
}, $apps);
|
||||
|
||||
|
|
|
@ -97,6 +97,18 @@ script(
|
|||
<div class="app-description-toggle-show"><?php p($l->t("Show description …"));?></div>
|
||||
<div class="app-description-toggle-hide hidden"><?php p($l->t("Hide description …"));?></div>
|
||||
|
||||
{{#if missingMinOwnCloudVersion}}
|
||||
<div class="app-dependencies">
|
||||
<p><?php p($l->t('This app has no minimum ownCloud version assigned. This will be an error in ownCloud 11 and later.')); ?></p>
|
||||
</div>
|
||||
{{else}}
|
||||
{{#if missingMaxOwnCloudVersion}}
|
||||
<div class="app-dependencies">
|
||||
<p><?php p($l->t('This app has no maximum ownCloud version assigned. This will be an error in ownCloud 11 and later.')); ?></p>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#unless canInstall}}
|
||||
<div class="app-dependencies">
|
||||
<p><?php p($l->t('This app cannot be installed because the following dependencies are not fulfilled:')); ?></p>
|
||||
|
|
Loading…
Reference in a new issue