mirror of
https://github.com/nextcloud/server.git
synced 2026-03-01 04:50:40 -05:00
add 'supported'-label to all supported apps, also if they are not downloaded yet
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
parent
bb56e9df55
commit
1237d64bdb
2 changed files with 18 additions and 3 deletions
|
|
@ -205,6 +205,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)) {
|
||||
|
|
@ -212,6 +213,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
|
||||
|
|
|
|||
|
|
@ -776,6 +776,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
|
||||
*
|
||||
|
|
@ -790,9 +802,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