summaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-05-30 15:53:08 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-06-29 09:08:33 +0200
commitbafb6b3c29995cdac283ea68c419213766d6a1d6 (patch)
treed28bdde269c00967a811f555a4e8958bbcc44149 /apps/updatenotification/lib
parent61842f66ee9d5b5ceb5ac925e5c213047d5a5e19 (diff)
downloadnextcloud-server-bafb6b3c29995cdac283ea68c419213766d6a1d6.tar.gz
nextcloud-server-bafb6b3c29995cdac283ea68c419213766d6a1d6.zip
display whats new info in admin settings
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/updatenotification/lib')
-rw-r--r--apps/updatenotification/lib/Settings/Admin.php2
-rw-r--r--apps/updatenotification/lib/UpdateChecker.php6
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/updatenotification/lib/Settings/Admin.php b/apps/updatenotification/lib/Settings/Admin.php
index bb12402aa07..1696e97d3ae 100644
--- a/apps/updatenotification/lib/Settings/Admin.php
+++ b/apps/updatenotification/lib/Settings/Admin.php
@@ -93,6 +93,8 @@ class Admin implements ISettings {
'channels' => $channels,
'newVersionString' => empty($updateState['updateVersion']) ? '' : $updateState['updateVersion'],
'downloadLink' => empty($updateState['downloadLink']) ? '' : $updateState['downloadLink'],
+ 'changelogURL' => empty($updateState['changelog']) ? false : $updateState['changelog'],
+ 'whatsNew' => empty($updateState['whatsNew']) ? false : $updateState['whatsNew'],
'updaterEnabled' => empty($updateState['updaterEnabled']) ? false : $updateState['updaterEnabled'],
'versionIsEol' => empty($updateState['versionIsEol']) ? false : $updateState['versionIsEol'],
'isDefaultUpdateServerURL' => $updateServerURL === $defaultUpdateServerURL,
diff --git a/apps/updatenotification/lib/UpdateChecker.php b/apps/updatenotification/lib/UpdateChecker.php
index bba1fa5d48c..f7b45a03f26 100644
--- a/apps/updatenotification/lib/UpdateChecker.php
+++ b/apps/updatenotification/lib/UpdateChecker.php
@@ -56,6 +56,12 @@ class UpdateChecker {
if (strpos($data['url'], 'https://') === 0) {
$result['downloadLink'] = $data['url'];
}
+ if (strpos($data['changelog'], 'https://') === 0) {
+ $result['changelog'] = $data['changelog'];
+ }
+ if($data['whatsNew'] !== null) {
+ $result['whatsNew'] = $data['whatsNew'];
+ }
return $result;
}