mirror of
https://github.com/nextcloud/server.git
synced 2026-04-23 07:08:34 -04:00
Merge pull request #29028 from nextcloud/add-supported-label-to-all-apps
add 'supported'-label to all supported apps
This commit is contained in:
commit
da1b97decd
2 changed files with 18 additions and 3 deletions
|
|
@ -204,6 +204,7 @@ class AppSettingsController extends Controller {
|
|||
}
|
||||
|
||||
$apps = $this->getAppsForCategory('');
|
||||
$supportedApps = $appClass->getSupportedApps();
|
||||
foreach ($apps as $app) {
|
||||
$app['appstore'] = true;
|
||||
if (!array_key_exists($app['id'], $this->allApps)) {
|
||||
|
|
@ -211,6 +212,10 @@ class AppSettingsController extends Controller {
|
|||
} else {
|
||||
$this->allApps[$app['id']] = array_merge($app, $this->allApps[$app['id']]);
|
||||
}
|
||||
|
||||
if (in_array($app['id'], $supportedApps)) {
|
||||
$this->allApps[$app['id']]['level'] = \OC_App::supportedApp;
|
||||
}
|
||||
}
|
||||
|
||||
// add bundle information
|
||||
|
|
|
|||
|
|
@ -773,6 +773,18 @@ class OC_App {
|
|||
return $apps;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue