summaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/lib/Controller
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-27 14:47:59 +0200
committerJoas Schilling <coding@schilljs.com>2016-09-27 14:47:59 +0200
commit3e00554d35be995f52fba4ab49fc6ef1b01fc37b (patch)
treece7942f14193e9f6c85401cbdfd4045e2fa9a07c /apps/updatenotification/lib/Controller
parent6f955defe46b498f014d4e0f105d26324bb7ecd6 (diff)
downloadnextcloud-server-3e00554d35be995f52fba4ab49fc6ef1b01fc37b.tar.gz
nextcloud-server-3e00554d35be995f52fba4ab49fc6ef1b01fc37b.zip
Respect updater kill switch and fall back to download button
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/updatenotification/lib/Controller')
-rw-r--r--apps/updatenotification/lib/Controller/AdminController.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/updatenotification/lib/Controller/AdminController.php b/apps/updatenotification/lib/Controller/AdminController.php
index 9f10f1b32f2..56f41ebf3ee 100644
--- a/apps/updatenotification/lib/Controller/AdminController.php
+++ b/apps/updatenotification/lib/Controller/AdminController.php
@@ -107,11 +107,13 @@ class AdminController extends Controller implements ISettings {
$notifyGroups = json_decode($this->config->getAppValue('updatenotification', 'notify_groups', '["admin"]'), true);
$params = [
- 'isNewVersionAvailable' => ($updateState === []) ? false : true,
+ 'isNewVersionAvailable' => !empty($updateState['updateAvailable']),
'lastChecked' => $lastUpdateCheck,
'currentChannel' => $currentChannel,
'channels' => $channels,
- 'newVersionString' => ($updateState === []) ? '' : $updateState['updateVersion'],
+ 'newVersionString' => (empty($updateState['updateVersion'])) ? '' : $updateState['updateVersion'],
+ 'downloadLink' => (empty($updateState['downloadLink'])) ? '' : $updateState['downloadLink'],
+ 'updaterEnabled' => $updateState['updaterEnabled'],
'notify_groups' => implode('|', $notifyGroups),
];