summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
Diffstat (limited to 'settings')
-rw-r--r--settings/controller/appsettingscontroller.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php
index d64c945c02c..4afc442117a 100644
--- a/settings/controller/appsettingscontroller.php
+++ b/settings/controller/appsettingscontroller.php
@@ -169,6 +169,15 @@ class AppSettingsController extends Controller {
}
return ($a < $b) ? -1 : 1;
});
+ foreach($apps as $key => $app) {
+ if(!array_key_exists('level', $app) && array_key_exists('ocsid', $app)) {
+ $remoteAppEntry = $this->ocsClient->getApplication($app['ocsid']);
+
+ if(array_key_exists('level', $remoteAppEntry)) {
+ $apps[$key]['level'] = $remoteAppEntry['level'];
+ }
+ }
+ }
break;
// not-installed apps
case 1:
@@ -176,6 +185,15 @@ class AppSettingsController extends Controller {
$apps = array_filter($apps, function ($app) {
return !$app['active'];
});
+ foreach($apps as $key => $app) {
+ if(!array_key_exists('level', $app) && array_key_exists('ocsid', $app)) {
+ $remoteAppEntry = $this->ocsClient->getApplication($app['ocsid']);
+
+ if(array_key_exists('level', $remoteAppEntry)) {
+ $apps[$key]['level'] = $remoteAppEntry['level'];
+ }
+ }
+ }
usort($apps, function ($a, $b) {
$a = (string)$a['name'];
$b = (string)$b['name'];