Change updater URL
This commit is contained in:
parent
27a3c68d84
commit
0cec06d0c8
|
@ -519,7 +519,7 @@ $CONFIG = array(
|
||||||
/**
|
/**
|
||||||
* URL that Nextcloud should use to look for updates
|
* URL that Nextcloud should use to look for updates
|
||||||
*/
|
*/
|
||||||
'updater.server.url' => 'https://updates.nextcloud.org/server/',
|
'updater.server.url' => 'https://updates.nextcloud.com/update-server/',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is Nextcloud connected to the Internet or running in a closed network?
|
* Is Nextcloud connected to the Internet or running in a closed network?
|
||||||
|
|
|
@ -59,7 +59,7 @@ class VersionCheck {
|
||||||
return json_decode($this->config->getAppValue('core', 'lastupdateResult'), true);
|
return json_decode($this->config->getAppValue('core', 'lastupdateResult'), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.com/server/');
|
$updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.com/update-server/');
|
||||||
|
|
||||||
$this->config->setAppValue('core', 'lastupdatedat', time());
|
$this->config->setAppValue('core', 'lastupdatedat', time());
|
||||||
|
|
||||||
|
|
|
@ -93,8 +93,8 @@ class VersionCheckTest extends \Test\TestCase {
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(1))
|
->expects($this->at(1))
|
||||||
->method('getSystemValue')
|
->method('getSystemValue')
|
||||||
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
|
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
|
||||||
->willReturn('https://updates.nextcloud.com/server/');
|
->willReturnArgument(1);
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(2))
|
->expects($this->at(2))
|
||||||
->method('setAppValue')
|
->method('setAppValue')
|
||||||
|
@ -124,7 +124,7 @@ class VersionCheckTest extends \Test\TestCase {
|
||||||
$this->updater
|
$this->updater
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('getUrlContent')
|
->method('getUrlContent')
|
||||||
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
|
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
|
||||||
->will($this->returnValue($updateXml));
|
->will($this->returnValue($updateXml));
|
||||||
|
|
||||||
$this->assertSame($expectedResult, $this->updater->check());
|
$this->assertSame($expectedResult, $this->updater->check());
|
||||||
|
@ -139,8 +139,8 @@ class VersionCheckTest extends \Test\TestCase {
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(1))
|
->expects($this->at(1))
|
||||||
->method('getSystemValue')
|
->method('getSystemValue')
|
||||||
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
|
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
|
||||||
->willReturn('https://updates.nextcloud.com/server/');
|
->willReturnArgument(1);
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(2))
|
->expects($this->at(2))
|
||||||
->method('setAppValue')
|
->method('setAppValue')
|
||||||
|
@ -164,7 +164,7 @@ class VersionCheckTest extends \Test\TestCase {
|
||||||
$this->updater
|
$this->updater
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('getUrlContent')
|
->method('getUrlContent')
|
||||||
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
|
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
|
||||||
->will($this->returnValue($updateXml));
|
->will($this->returnValue($updateXml));
|
||||||
|
|
||||||
$this->assertSame([], $this->updater->check());
|
$this->assertSame([], $this->updater->check());
|
||||||
|
@ -186,8 +186,8 @@ class VersionCheckTest extends \Test\TestCase {
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(1))
|
->expects($this->at(1))
|
||||||
->method('getSystemValue')
|
->method('getSystemValue')
|
||||||
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
|
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
|
||||||
->willReturn('https://updates.nextcloud.com/server/');
|
->willReturnArgument(1);
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(2))
|
->expects($this->at(2))
|
||||||
->method('setAppValue')
|
->method('setAppValue')
|
||||||
|
@ -213,7 +213,7 @@ class VersionCheckTest extends \Test\TestCase {
|
||||||
$this->updater
|
$this->updater
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('getUrlContent')
|
->method('getUrlContent')
|
||||||
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
|
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
|
||||||
->will($this->returnValue($updateXml));
|
->will($this->returnValue($updateXml));
|
||||||
|
|
||||||
$this->assertSame($expectedResult, $this->updater->check());
|
$this->assertSame($expectedResult, $this->updater->check());
|
||||||
|
@ -230,8 +230,8 @@ class VersionCheckTest extends \Test\TestCase {
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(1))
|
->expects($this->at(1))
|
||||||
->method('getSystemValue')
|
->method('getSystemValue')
|
||||||
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
|
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
|
||||||
->willReturn('https://updates.nextcloud.com/server/');
|
->willReturnArgument(1);
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->at(2))
|
->expects($this->at(2))
|
||||||
->method('setAppValue')
|
->method('setAppValue')
|
||||||
|
@ -255,7 +255,7 @@ class VersionCheckTest extends \Test\TestCase {
|
||||||
$this->updater
|
$this->updater
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('getUrlContent')
|
->method('getUrlContent')
|
||||||
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
|
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
|
||||||
->will($this->returnValue($updateXml));
|
->will($this->returnValue($updateXml));
|
||||||
|
|
||||||
$this->assertSame($expectedResult, $this->updater->check());
|
$this->assertSame($expectedResult, $this->updater->check());
|
||||||
|
|
Loading…
Reference in New Issue