Signed-off-by: Julien Veyssier <eneiluj@posteo.net>tags/v23.0.0beta2
@@ -131,7 +131,7 @@ class AppSettingsController extends Controller { | |||
public function viewApps(): TemplateResponse { | |||
\OC_Util::addScript('settings', 'apps'); | |||
$params = []; | |||
$params['appstoreEnabled'] = $this->config->getSystemValue('appstoreenabled', true) === true; | |||
$params['appstoreEnabled'] = $this->config->getSystemValueBool('appstoreenabled', true); | |||
$params['updateCount'] = count($this->getAppsWithUpdates()); | |||
$params['developerDocumentation'] = $this->urlGenerator->linkToDocs('developer-manual'); | |||
$params['bundles'] = $this->getBundles(); |
@@ -190,7 +190,7 @@ class AppSettingsControllerTest extends TestCase { | |||
->willReturn(false); | |||
$this->config | |||
->expects($this->once()) | |||
->method('getSystemValue') | |||
->method('getSystemValueBool') | |||
->with('appstoreenabled', true) | |||
->willReturn(true); | |||
$this->navigationManager | |||
@@ -224,7 +224,7 @@ class AppSettingsControllerTest extends TestCase { | |||
$this->bundleFetcher->expects($this->once())->method('getBundles')->willReturn([]); | |||
$this->config | |||
->expects($this->once()) | |||
->method('getSystemValue') | |||
->method('getSystemValueBool') | |||
->with('appstoreenabled', true) | |||
->willReturn(false); | |||
$this->navigationManager |
@@ -90,7 +90,7 @@ abstract class Fetcher { | |||
* @return array | |||
*/ | |||
protected function fetch($ETag, $content) { | |||
$appstoreenabled = $this->config->getSystemValue('appstoreenabled', true); | |||
$appstoreenabled = $this->config->getSystemValueBool('appstoreenabled', true); | |||
if ((int)$this->config->getAppValue('settings', 'appstore-fetcher-lastFailure', '0') > time() - self::RETRY_AFTER_FAILURE_SECONDS) { | |||
return []; | |||
} | |||
@@ -148,7 +148,7 @@ abstract class Fetcher { | |||
* @return array | |||
*/ | |||
public function get($allowUnstable = false) { | |||
$appstoreenabled = $this->config->getSystemValue('appstoreenabled', true); | |||
$appstoreenabled = $this->config->getSystemValueBool('appstoreenabled', true); | |||
$internetavailable = $this->config->getSystemValue('has_internet_connection', true); | |||
if (!$appstoreenabled || !$internetavailable) { |