diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-05-10 14:50:24 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2019-05-13 13:36:02 +0200 |
commit | 361836675cc9d37a5cf74c5f99c3739c5eb271c9 (patch) | |
tree | 37fa956def0069f7ca4099352e79eb8b40a64617 /lib | |
parent | 74ad4cce838172a51d441ffd53b7cae936f9dbb3 (diff) | |
download | nextcloud-server-361836675cc9d37a5cf74c5f99c3739c5eb271c9.tar.gz nextcloud-server-361836675cc9d37a5cf74c5f99c3739c5eb271c9.zip |
Show supported apps in app management
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/app.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index 9f51c022d6c..d495bef2ebd 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -71,6 +71,7 @@ class OC_App { static private $altLogin = []; static private $alreadyRegistered = []; static public $autoDisabledApps = []; + const supportedApp = 300; const officialApp = 200; /** @@ -704,6 +705,9 @@ 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(); foreach ($installedApps as $app) { if (array_search($app, $blacklist) === false) { @@ -741,6 +745,10 @@ class OC_App { $info['removable'] = true; } + if (in_array($app, $supportedApps)) { + $info['level'] = self::supportedApp; + } + $appPath = self::getAppPath($app); if($appPath !== false) { $appIcon = $appPath . '/img/' . $app . '.svg'; |