diff options
author | Joas Schilling <coding@schilljs.com> | 2018-01-18 12:25:52 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-02-22 10:17:41 +0100 |
commit | b12b391d7c4875fde4851c748dfb610a1b32d2e4 (patch) | |
tree | c8c81ce742dc2582f1b9e99b62dc8da6fe689bfa /apps/updatenotification/lib | |
parent | 52f8d75d1af69acfb8bce3a618e89f99cdcde930 (diff) | |
download | nextcloud-server-b12b391d7c4875fde4851c748dfb610a1b32d2e4.tar.gz nextcloud-server-b12b391d7c4875fde4851c748dfb610a1b32d2e4.zip |
Migrate the app to Vue.js
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/updatenotification/lib')
-rw-r--r-- | apps/updatenotification/lib/Settings/Admin.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/updatenotification/lib/Settings/Admin.php b/apps/updatenotification/lib/Settings/Admin.php index cf65aed5e2c..55cab099940 100644 --- a/apps/updatenotification/lib/Settings/Admin.php +++ b/apps/updatenotification/lib/Settings/Admin.php @@ -68,11 +68,10 @@ class Admin implements ISettings { 'production', ]; $currentChannel = Util::getChannel(); - - // Remove the currently used channel from the channels list - if(($key = array_search($currentChannel, $channels, true)) !== false) { - unset($channels[$key]); + if ($currentChannel === 'git') { + $channels[] = 'git'; } + $updateState = $this->updateChecker->getUpdateState(); $notifyGroups = json_decode($this->config->getAppValue('updatenotification', 'notify_groups', '["admin"]'), true); @@ -91,7 +90,11 @@ class Admin implements ISettings { 'updaterEnabled' => empty($updateState['updaterEnabled']) ? false : $updateState['updaterEnabled'], 'isDefaultUpdateServerURL' => $updateServerURL === $defaultUpdateServerURL, 'updateServerURL' => $updateServerURL, - 'notify_groups' => implode('|', $notifyGroups), + 'notifyGroups' => implode('|', $notifyGroups), + ]; + + $params = [ + 'json' => json_encode($params), ]; return new TemplateResponse('updatenotification', 'admin', $params, ''); |