Merge pull request #1312 from nextcloud/stable10-backport-1307

[stable10] Fix update notification
This commit is contained in:
Marius Blüm 2016-09-07 23:44:17 +02:00 committed by GitHub
commit d2c2f02cc2
4 changed files with 15 additions and 15 deletions

View File

@ -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')]]);
}
/**

View File

@ -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>

View File

@ -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());

View File

@ -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());