summaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-11-09 16:48:12 +0100
committerGitHub <noreply@github.com>2018-11-09 16:48:12 +0100
commitb7a59fb56a055764b5251c95f4d57d6883934136 (patch)
tree3581cb9f645ab41feec3ad67d11912ed4d755c63 /apps/updatenotification/lib
parentda57aaf8147778a6a2e4d3ccb0bd130ddeef2fcb (diff)
parenteff7a9c904e59ce112d70e159e85731751d01b34 (diff)
downloadnextcloud-server-b7a59fb56a055764b5251c95f4d57d6883934136.tar.gz
nextcloud-server-b7a59fb56a055764b5251c95f4d57d6883934136.zip
Merge pull request #12358 from nextcloud/bugfix/noid/wrong-update-check-version
Check for compatible apps from the appstore fails
Diffstat (limited to 'apps/updatenotification/lib')
-rw-r--r--apps/updatenotification/lib/Command/Check.php2
-rw-r--r--apps/updatenotification/lib/Settings/Admin.php3
-rw-r--r--apps/updatenotification/lib/UpdateChecker.php5
3 files changed, 6 insertions, 4 deletions
diff --git a/apps/updatenotification/lib/Command/Check.php b/apps/updatenotification/lib/Command/Check.php
index f363832873b..fac4e4201f2 100644
--- a/apps/updatenotification/lib/Command/Check.php
+++ b/apps/updatenotification/lib/Command/Check.php
@@ -67,7 +67,7 @@ class Check extends Command {
// Server
$r = $this->updateChecker->getUpdateState();
if (isset($r['updateAvailable']) && $r['updateAvailable']) {
- $output->writeln($r['updateVersion'] . ' is available. Get more information on how to update at '. $r['updateLink'] . '.');
+ $output->writeln($r['updateVersionString'] . ' is available. Get more information on how to update at '. $r['updateLink'] . '.');
$updatesAvailableCount += 1;
}
diff --git a/apps/updatenotification/lib/Settings/Admin.php b/apps/updatenotification/lib/Settings/Admin.php
index 54adf558224..b1abdd874d1 100644
--- a/apps/updatenotification/lib/Settings/Admin.php
+++ b/apps/updatenotification/lib/Settings/Admin.php
@@ -97,7 +97,8 @@ class Admin implements ISettings {
'lastChecked' => $lastUpdateCheck,
'currentChannel' => $currentChannel,
'channels' => $channels,
- 'newVersionString' => empty($updateState['updateVersion']) ? '' : $updateState['updateVersion'],
+ 'newVersion' => empty($updateState['updateVersion']) ? '' : $updateState['updateVersion'],
+ 'newVersionString' => empty($updateState['updateVersionString']) ? '' : $updateState['updateVersionString'],
'downloadLink' => empty($updateState['downloadLink']) ? '' : $updateState['downloadLink'],
'changes' => $this->filterChanges($updateState['changes'] ?? []),
'updaterEnabled' => empty($updateState['updaterEnabled']) ? false : $updateState['updaterEnabled'],
diff --git a/apps/updatenotification/lib/UpdateChecker.php b/apps/updatenotification/lib/UpdateChecker.php
index bd03cb442be..6375e21b084 100644
--- a/apps/updatenotification/lib/UpdateChecker.php
+++ b/apps/updatenotification/lib/UpdateChecker.php
@@ -51,7 +51,8 @@ class UpdateChecker {
if (isset($data['version']) && $data['version'] !== '' && $data['version'] !== []) {
$result['updateAvailable'] = true;
- $result['updateVersion'] = $data['versionstring'];
+ $result['updateVersion'] = $data['version'];
+ $result['updateVersionString'] = $data['versionstring'];
$result['updaterEnabled'] = $data['autoupdater'] === '1';
$result['versionIsEol'] = $data['eol'] === '1';
if (strpos($data['web'], 'https://') === 0) {
@@ -80,7 +81,7 @@ class UpdateChecker {
public function populateJavaScriptVariables(array $data) {
$data['array']['oc_updateState'] = json_encode([
'updateAvailable' => true,
- 'updateVersion' => $this->getUpdateState()['updateVersion'],
+ 'updateVersion' => $this->getUpdateState()['updateVersionString'],
'updateLink' => $this->getUpdateState()['updateLink'] ?? '',
]);
}