diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2021-09-08 23:43:17 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2021-10-06 22:17:50 +0200 |
commit | 664bd5802f19c8e0768b64a6f66713d95a9aaab5 (patch) | |
tree | 97a8cf85eac2db545986387b91ee67cd8e521342 /lib | |
parent | 9a569ff387f0f74af4b5423c1c1180a1d01fa7bd (diff) | |
download | nextcloud-server-664bd5802f19c8e0768b64a6f66713d95a9aaab5.tar.gz nextcloud-server-664bd5802f19c8e0768b64a6f66713d95a9aaab5.zip |
add 'supported'-label to all supported apps, also if they are not downloaded yet
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_App.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index 811703570a2..101523fcfe7 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -774,6 +774,18 @@ class OC_App { } /** + * List all supported apps + * + * @return array + */ + public function getSupportedApps(): array { + /** @var \OCP\Support\Subscription\IRegistry $subscriptionRegistry */ + $subscriptionRegistry = \OC::$server->query(\OCP\Support\Subscription\IRegistry::class); + $supportedApps = $subscriptionRegistry->delegateGetSupportedApps(); + return $supportedApps; + } + + /** * List all apps, this is used in apps.php * * @return array @@ -787,9 +799,7 @@ class OC_App { $appList = []; $langCode = \OC::$server->getL10N('core')->getLanguageCode(); $urlGenerator = \OC::$server->getURLGenerator(); - /** @var \OCP\Support\Subscription\IRegistry $subscriptionRegistry */ - $subscriptionRegistry = \OC::$server->query(\OCP\Support\Subscription\IRegistry::class); - $supportedApps = $subscriptionRegistry->delegateGetSupportedApps(); + $supportedApps = $this->getSupportedApps(); foreach ($installedApps as $app) { if (array_search($app, $blacklist) === false) { |