Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2021-09-09 00:43:17 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-10-12 14:47:17 +0300
commit60e6e062312f2567b77ccd19d29b9355fdca1d22 (patch)
tree98685ad2a3abcfcb5a699ed353ae51acdd212fd4 /lib
parent4a3b1bdc0f266ec795d62bafd87f17c4ddae2a36 (diff)
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.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php
index 9c980dd8479..1d52ada9399 100644
--- a/lib/private/legacy/OC_App.php
+++ b/lib/private/legacy/OC_App.php
@@ -769,6 +769,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
@@ -782,9 +794,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) {