From 5bf17607b391257ced9339b969c5da6164ead495 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 05580f02428c81bc66d165d3303bfcf433dd746f 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 6f6508d314..88ba9b63fa 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 2d9574db3433dc29076521325d6b44f28b3c58fa 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 5283ca9c55..e39c9362a1 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());