Skip to content
Snippets Groups Projects
Commit b3d3a95b authored by Joas Schilling's avatar Joas Schilling Committed by GitHub
Browse files

Merge pull request #1307 from nextcloud/fix-update-notification

Fix update notification
parents 3dd619d8 2d9574db
No related branches found
No related tags found
No related merge requests found
......@@ -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')]]);
}
/**
......
......@@ -32,7 +32,7 @@
</option>
<?php } ?>
</select>
<span id="channel_save_msg"></span>
<span id="channel_save_msg" class="msg"></span>
</p>
<p>
<em><?php p($l->t('You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel.')); ?></em>
......
......@@ -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());
......
......@@ -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());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment