diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-06-29 13:41:11 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-06-29 13:41:11 +0200 |
commit | 5810e7ab87bd4ce69107cdaf2689154e2e59ab5c (patch) | |
tree | 37ced4821300b124363ddba7c4cedec8568eddc8 /settings | |
parent | aa595392f6f033b0441846a71f5da3c033e15fd5 (diff) | |
parent | 30145c0b52cdc084276e7c682be1ccc4443a6343 (diff) | |
download | nextcloud-server-5810e7ab87bd4ce69107cdaf2689154e2e59ab5c.tar.gz nextcloud-server-5810e7ab87bd4ce69107cdaf2689154e2e59ab5c.zip |
Merge pull request #17050 from owncloud/request-status-from-ocs
Request approved state for disabled apps with ocsid
Diffstat (limited to 'settings')
-rw-r--r-- | settings/controller/appsettingscontroller.php | 18 |
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']; |