From 86bbea9b8cf1c2ed05c98d9178694ee6162995f1 Mon Sep 17 00:00:00 2001
From: Morris Jobke
Date: Wed, 7 Sep 2016 16:38:12 +0200
Subject: [PATCH 1/3] Fix layout of success message and text
---
apps/updatenotification/lib/Controller/AdminController.php | 2 +-
apps/updatenotification/templates/admin.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/updatenotification/lib/Controller/AdminController.php b/apps/updatenotification/lib/Controller/AdminController.php
index ebb3fa642f..9f10f1b32f 100644
--- a/apps/updatenotification/lib/Controller/AdminController.php
+++ b/apps/updatenotification/lib/Controller/AdminController.php
@@ -128,7 +128,7 @@ class AdminController extends Controller implements ISettings {
public function setChannel($channel) {
\OCP\Util::setChannel($channel);
$this->config->setAppValue('core', 'lastupdatedat', 0);
- return new DataResponse(['status' => 'success', 'data' => ['message' => $this->l10n->t('Updated channel')]]);
+ return new DataResponse(['status' => 'success', 'data' => ['message' => $this->l10n->t('Channel updated')]]);
}
/**
diff --git a/apps/updatenotification/templates/admin.php b/apps/updatenotification/templates/admin.php
index 3c3d6cbd4c..68ef1d423b 100644
--- a/apps/updatenotification/templates/admin.php
+++ b/apps/updatenotification/templates/admin.php
@@ -32,7 +32,7 @@
-
+
t('You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel.')); ?>
From 12d077065c15b53f8dedd9428785f82a9542abcb Mon Sep 17 00:00:00 2001
From: Morris Jobke
Date: Wed, 7 Sep 2016 16:38:51 +0200
Subject: [PATCH 2/3] Fix updater URL
---
lib/private/Updater/VersionCheck.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php
index d240687f9b..a4416986f0 100644
--- a/lib/private/Updater/VersionCheck.php
+++ b/lib/private/Updater/VersionCheck.php
@@ -59,7 +59,7 @@ class VersionCheck {
return json_decode($this->config->getAppValue('core', 'lastupdateResult'), true);
}
- $updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.owncloud.com/server/');
+ $updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.com/server/');
$this->config->setAppValue('core', 'lastupdatedat', time());
From 17dc2c344f2297f03235c8ab3b6e5c0cbe1ee526 Mon Sep 17 00:00:00 2001
From: Morris Jobke
Date: Wed, 7 Sep 2016 17:15:03 +0200
Subject: [PATCH 3/3] fix tests
---
tests/lib/Updater/VersionCheckTest.php | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/tests/lib/Updater/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php
index fb43571cec..99245b5801 100644
--- a/tests/lib/Updater/VersionCheckTest.php
+++ b/tests/lib/Updater/VersionCheckTest.php
@@ -91,8 +91,8 @@ class VersionCheckTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('getSystemValue')
- ->with('updater.server.url', 'https://updates.owncloud.com/server/')
- ->willReturn('https://updates.owncloud.com/server/');
+ ->with('updater.server.url', 'https://updates.nextcloud.com/server/')
+ ->willReturn('https://updates.nextcloud.com/server/');
$this->config
->expects($this->at(2))
->method('setAppValue')
@@ -122,7 +122,7 @@ class VersionCheckTest extends \Test\TestCase {
$this->updater
->expects($this->once())
->method('getUrlContent')
- ->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
+ ->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
->will($this->returnValue($updateXml));
$this->assertSame($expectedResult, $this->updater->check());
@@ -137,8 +137,8 @@ class VersionCheckTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('getSystemValue')
- ->with('updater.server.url', 'https://updates.owncloud.com/server/')
- ->willReturn('https://updates.owncloud.com/server/');
+ ->with('updater.server.url', 'https://updates.nextcloud.com/server/')
+ ->willReturn('https://updates.nextcloud.com/server/');
$this->config
->expects($this->at(2))
->method('setAppValue')
@@ -162,7 +162,7 @@ class VersionCheckTest extends \Test\TestCase {
$this->updater
->expects($this->once())
->method('getUrlContent')
- ->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
+ ->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
->will($this->returnValue($updateXml));
$this->assertSame([], $this->updater->check());
@@ -184,8 +184,8 @@ class VersionCheckTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('getSystemValue')
- ->with('updater.server.url', 'https://updates.owncloud.com/server/')
- ->willReturn('https://updates.owncloud.com/server/');
+ ->with('updater.server.url', 'https://updates.nextcloud.com/server/')
+ ->willReturn('https://updates.nextcloud.com/server/');
$this->config
->expects($this->at(2))
->method('setAppValue')
@@ -211,7 +211,7 @@ class VersionCheckTest extends \Test\TestCase {
$this->updater
->expects($this->once())
->method('getUrlContent')
- ->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
+ ->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
->will($this->returnValue($updateXml));
$this->assertSame($expectedResult, $this->updater->check());
@@ -228,8 +228,8 @@ class VersionCheckTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('getSystemValue')
- ->with('updater.server.url', 'https://updates.owncloud.com/server/')
- ->willReturn('https://updates.owncloud.com/server/');
+ ->with('updater.server.url', 'https://updates.nextcloud.com/server/')
+ ->willReturn('https://updates.nextcloud.com/server/');
$this->config
->expects($this->at(2))
->method('setAppValue')
@@ -253,7 +253,7 @@ class VersionCheckTest extends \Test\TestCase {
$this->updater
->expects($this->once())
->method('getUrlContent')
- ->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
+ ->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
->will($this->returnValue($updateXml));
$this->assertSame($expectedResult, $this->updater->check());