From 83855c073bda187084ad644541f5c46465f16b8e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 7 Jan 2016 14:55:23 +0100 Subject: [PATCH 1/4] Add a warning on the apps list when the version is missing --- settings/controller/appsettingscontroller.php | 3 +++ settings/templates/apps.php | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php index 765fe2d285..79b7589027 100644 --- a/settings/controller/appsettingscontroller.php +++ b/settings/controller/appsettingscontroller.php @@ -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); diff --git a/settings/templates/apps.php b/settings/templates/apps.php index 7213d552c0..94efd76c7c 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -97,6 +97,18 @@ script(
t("Show description …"));?>
+ {{#if missingMinOwnCloudVersion}} +
+

t('This app has no minimum ownCloud version assigned. This will be an error in ownCloud 11 and later.')); ?>

+
+ {{else}} + {{#if missingMaxOwnCloudVersion}} +
+

t('This app has no maximum ownCloud version assigned. This will be an error in ownCloud 11 and later.')); ?>

+
+ {{/if}} + {{/if}} + {{#unless canInstall}}

t('This app cannot be installed because the following dependencies are not fulfilled:')); ?>

From c55da1fc8d6f3487d89be1ad197a9f54c5e930b8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 7 Jan 2016 15:04:36 +0100 Subject: [PATCH 2/4] Add a warning to the app:check-code if the version is missing --- core/command/app/checkcode.php | 4 ++++ lib/private/app/codechecker/infochecker.php | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/core/command/app/checkcode.php b/core/command/app/checkcode.php index e186d458c0..bc3ae07890 100644 --- a/core/command/app/checkcode.php +++ b/core/command/app/checkcode.php @@ -131,6 +131,10 @@ class CheckCode extends Command { } }); + $infoChecker->listen('InfoChecker', 'missingRequirement', function($minMax) use ($output) { + $output->writeln("ownCloud $minMax version requirement missing (will be an error in ownCloud 11 and later)"); + }); + $infoChecker->listen('InfoChecker', 'duplicateRequirement', function($minMax) use ($output) { $output->writeln("Duplicate $minMax ownCloud version requirement found"); }); diff --git a/lib/private/app/codechecker/infochecker.php b/lib/private/app/codechecker/infochecker.php index 24835d8148..2589277118 100644 --- a/lib/private/app/codechecker/infochecker.php +++ b/lib/private/app/codechecker/infochecker.php @@ -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) { From 40f786060efb6b7799b5e5e0de5e971cfab11e14 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 7 Jan 2016 15:11:49 +0100 Subject: [PATCH 3/4] Add ownCloud min and max version for shipped apps --- apps/dav/appinfo/info.xml | 4 +++- apps/encryption/appinfo/info.xml | 2 +- apps/federation/appinfo/info.xml | 6 +++--- apps/files/appinfo/info.xml | 2 +- apps/files_external/appinfo/info.xml | 2 +- apps/files_sharing/appinfo/info.xml | 2 +- apps/files_trashbin/appinfo/info.xml | 2 +- apps/files_versions/appinfo/info.xml | 2 +- apps/provisioning_api/appinfo/info.xml | 2 +- apps/user_ldap/appinfo/info.xml | 2 +- 10 files changed, 14 insertions(+), 12 deletions(-) diff --git a/apps/dav/appinfo/info.xml b/apps/dav/appinfo/info.xml index 5f681e784f..c3182a290d 100644 --- a/apps/dav/appinfo/info.xml +++ b/apps/dav/appinfo/info.xml @@ -6,7 +6,6 @@ AGPL owncloud.org 0.1.3 - 9.0 true @@ -21,4 +20,7 @@ appinfo/v1/publicwebdav.php + + + diff --git a/apps/encryption/appinfo/info.xml b/apps/encryption/appinfo/info.xml index 2224f026e4..f639484f7f 100644 --- a/apps/encryption/appinfo/info.xml +++ b/apps/encryption/appinfo/info.xml @@ -26,7 +26,7 @@ openssl - + diff --git a/apps/federation/appinfo/info.xml b/apps/federation/appinfo/info.xml index 53b2926ba5..92afc99536 100644 --- a/apps/federation/appinfo/info.xml +++ b/apps/federation/appinfo/info.xml @@ -8,7 +8,7 @@ 0.0.1 Federation other - - - + + + diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml index df12b87397..949c4261c1 100644 --- a/apps/files/appinfo/info.xml +++ b/apps/files/appinfo/info.xml @@ -13,7 +13,7 @@ - + user-files diff --git a/apps/files_external/appinfo/info.xml b/apps/files_external/appinfo/info.xml index 355d9feb4b..77d2ac462c 100644 --- a/apps/files_external/appinfo/info.xml +++ b/apps/files_external/appinfo/info.xml @@ -21,6 +21,6 @@ 166048 - + diff --git a/apps/files_sharing/appinfo/info.xml b/apps/files_sharing/appinfo/info.xml index 72e5645696..057801c697 100644 --- a/apps/files_sharing/appinfo/info.xml +++ b/apps/files_sharing/appinfo/info.xml @@ -16,7 +16,7 @@ Turning the feature off removes shared files and folders on the server for all s - + public.php diff --git a/apps/files_trashbin/appinfo/info.xml b/apps/files_trashbin/appinfo/info.xml index c4bade081b..c1920554d2 100644 --- a/apps/files_trashbin/appinfo/info.xml +++ b/apps/files_trashbin/appinfo/info.xml @@ -16,7 +16,7 @@ To prevent a user from running out of disk space, the ownCloud Deleted files app - + user-trashbin diff --git a/apps/files_versions/appinfo/info.xml b/apps/files_versions/appinfo/info.xml index 8fe6372279..91596f63b5 100644 --- a/apps/files_versions/appinfo/info.xml +++ b/apps/files_versions/appinfo/info.xml @@ -15,7 +15,7 @@ In addition to the expiry of versions, ownCloud’s versions app makes certain n - + user-versions diff --git a/apps/provisioning_api/appinfo/info.xml b/apps/provisioning_api/appinfo/info.xml index a77b1f67e2..4367fc5cd0 100644 --- a/apps/provisioning_api/appinfo/info.xml +++ b/apps/provisioning_api/appinfo/info.xml @@ -24,6 +24,6 @@ - + diff --git a/apps/user_ldap/appinfo/info.xml b/apps/user_ldap/appinfo/info.xml index 7dbce1da5f..be41a87080 100644 --- a/apps/user_ldap/appinfo/info.xml +++ b/apps/user_ldap/appinfo/info.xml @@ -19,6 +19,6 @@ A user logs into ownCloud with their LDAP or AD credentials, and is granted acce ldap - + From ae285c065448a6e45d6e1e542da87ea0a692cbee Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 7 Jan 2016 15:15:58 +0100 Subject: [PATCH 4/4] Remove deprecated shipped flag from info.xml which has no use anymore --- apps/dav/appinfo/info.xml | 1 - apps/encryption/appinfo/info.xml | 1 - apps/files/appinfo/info.xml | 1 - apps/files_external/appinfo/info.xml | 1 - apps/files_sharing/appinfo/info.xml | 1 - apps/files_trashbin/appinfo/info.xml | 1 - apps/files_versions/appinfo/info.xml | 1 - apps/provisioning_api/appinfo/info.xml | 1 - apps/user_ldap/appinfo/info.xml | 1 - 9 files changed, 9 deletions(-) diff --git a/apps/dav/appinfo/info.xml b/apps/dav/appinfo/info.xml index c3182a290d..d9eefaefcf 100644 --- a/apps/dav/appinfo/info.xml +++ b/apps/dav/appinfo/info.xml @@ -6,7 +6,6 @@ AGPL owncloud.org 0.1.3 - true diff --git a/apps/encryption/appinfo/info.xml b/apps/encryption/appinfo/info.xml index f639484f7f..1fb4e93c50 100644 --- a/apps/encryption/appinfo/info.xml +++ b/apps/encryption/appinfo/info.xml @@ -14,7 +14,6 @@ Default encryption module AGPL Bjoern Schiessle, Clark Tomlinson - true user-encryption admin-encryption diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml index 949c4261c1..37ee564057 100644 --- a/apps/files/appinfo/info.xml +++ b/apps/files/appinfo/info.xml @@ -5,7 +5,6 @@ File Management AGPL Robin Appelman, Vincent Petry - true 1.4.1 diff --git a/apps/files_external/appinfo/info.xml b/apps/files_external/appinfo/info.xml index 77d2ac462c..1a9fa73de3 100644 --- a/apps/files_external/appinfo/info.xml +++ b/apps/files_external/appinfo/info.xml @@ -9,7 +9,6 @@ AGPL Robin Appelman, Michael Gapczynski, Vincent Petry - true admin-external-storage diff --git a/apps/files_sharing/appinfo/info.xml b/apps/files_sharing/appinfo/info.xml index 057801c697..bb16345f10 100644 --- a/apps/files_sharing/appinfo/info.xml +++ b/apps/files_sharing/appinfo/info.xml @@ -9,7 +9,6 @@ Turning the feature off removes shared files and folders on the server for all s AGPL Michael Gapczynski, Bjoern Schiessle - true 0.8.1 diff --git a/apps/files_trashbin/appinfo/info.xml b/apps/files_trashbin/appinfo/info.xml index c1920554d2..8fcb9956c7 100644 --- a/apps/files_trashbin/appinfo/info.xml +++ b/apps/files_trashbin/appinfo/info.xml @@ -9,7 +9,6 @@ To prevent a user from running out of disk space, the ownCloud Deleted files app AGPL Bjoern Schiessle - true 0.8.0 diff --git a/apps/files_versions/appinfo/info.xml b/apps/files_versions/appinfo/info.xml index 91596f63b5..0098ea9e20 100644 --- a/apps/files_versions/appinfo/info.xml +++ b/apps/files_versions/appinfo/info.xml @@ -4,7 +4,6 @@ Versions AGPL Frank Karlitschek, Bjoern Schiessle - true 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. diff --git a/apps/provisioning_api/appinfo/info.xml b/apps/provisioning_api/appinfo/info.xml index 4367fc5cd0..a8702aaf1e 100644 --- a/apps/provisioning_api/appinfo/info.xml +++ b/apps/provisioning_api/appinfo/info.xml @@ -13,7 +13,6 @@ AGPL Tom Needham - true admin-provisioning-api diff --git a/apps/user_ldap/appinfo/info.xml b/apps/user_ldap/appinfo/info.xml index be41a87080..864eaebe4d 100644 --- a/apps/user_ldap/appinfo/info.xml +++ b/apps/user_ldap/appinfo/info.xml @@ -9,7 +9,6 @@ A user logs into ownCloud with their LDAP or AD credentials, and is granted acce AGPL Dominik Schmidt and Arthur Schiwon - true 0.8.0