Merge pull request #68 from nextcloud/stable9-custom-updater-url
[stable9] Use custom updater URL
This commit is contained in:
commit
145954d360
|
@ -499,7 +499,7 @@ $CONFIG = array(
|
|||
/**
|
||||
* URL that ownCloud should use to look for updates
|
||||
*/
|
||||
'updater.server.url' => 'https://updates.owncloud.com/server/',
|
||||
'updater.server.url' => 'https://updates.nextcloud.org/server/',
|
||||
|
||||
/**
|
||||
* Is ownCloud connected to the Internet or running in a closed network?
|
||||
|
|
|
@ -143,7 +143,7 @@ class Updater extends BasicEmitter {
|
|||
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.org/server/');
|
||||
|
||||
$this->config->setAppValue('core', 'lastupdatedat', time());
|
||||
|
||||
|
|
|
@ -222,8 +222,8 @@ class UpdaterTest 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.org/server/')
|
||||
->willReturn('https://updates.nextcloud.org/server/');
|
||||
$this->config
|
||||
->expects($this->at(2))
|
||||
->method('setAppValue')
|
||||
|
@ -253,7 +253,7 @@ class UpdaterTest extends \Test\TestCase {
|
|||
$this->httpHelper
|
||||
->expects($this->once())
|
||||
->method('getUrlContent')
|
||||
->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
|
||||
->with($this->buildUpdateUrl('https://updates.nextcloud.org/server/'))
|
||||
->will($this->returnValue($updateXml));
|
||||
|
||||
$this->assertSame($expectedResult, $this->updater->check());
|
||||
|
@ -268,8 +268,8 @@ class UpdaterTest 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.org/server/')
|
||||
->willReturn('https://updates.nextcloud.org/server/');
|
||||
$this->config
|
||||
->expects($this->at(2))
|
||||
->method('setAppValue')
|
||||
|
@ -293,7 +293,7 @@ class UpdaterTest extends \Test\TestCase {
|
|||
$this->httpHelper
|
||||
->expects($this->once())
|
||||
->method('getUrlContent')
|
||||
->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
|
||||
->with($this->buildUpdateUrl('https://updates.nextcloud.org/server/'))
|
||||
->will($this->returnValue($updateXml));
|
||||
|
||||
$this->assertSame([], $this->updater->check());
|
||||
|
@ -315,8 +315,8 @@ class UpdaterTest 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.org/server/')
|
||||
->willReturn('https://updates.nextcloud.org/server/');
|
||||
$this->config
|
||||
->expects($this->at(2))
|
||||
->method('setAppValue')
|
||||
|
@ -342,7 +342,7 @@ class UpdaterTest extends \Test\TestCase {
|
|||
$this->httpHelper
|
||||
->expects($this->once())
|
||||
->method('getUrlContent')
|
||||
->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
|
||||
->with($this->buildUpdateUrl('https://updates.nextcloud.org/server/'))
|
||||
->will($this->returnValue($updateXml));
|
||||
|
||||
$this->assertSame($expectedResult, $this->updater->check());
|
||||
|
@ -359,8 +359,8 @@ class UpdaterTest 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.org/server/')
|
||||
->willReturn('https://updates.nextcloud.org/server/');
|
||||
$this->config
|
||||
->expects($this->at(2))
|
||||
->method('setAppValue')
|
||||
|
@ -384,7 +384,7 @@ class UpdaterTest extends \Test\TestCase {
|
|||
$this->httpHelper
|
||||
->expects($this->once())
|
||||
->method('getUrlContent')
|
||||
->with($this->buildUpdateUrl('https://updates.owncloud.com/server/'))
|
||||
->with($this->buildUpdateUrl('https://updates.nextcloud.org/server/'))
|
||||
->will($this->returnValue($updateXml));
|
||||
|
||||
$this->assertSame($expectedResult, $this->updater->check());
|
||||
|
|
Loading…
Reference in New Issue