summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/settings/lib/Controller/AppSettingsController.php2
-rw-r--r--apps/settings/tests/Controller/AppSettingsControllerTest.php4
-rw-r--r--lib/private/App/AppStore/Fetcher/Fetcher.php4
3 files changed, 5 insertions, 5 deletions
diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php
index 5ed25ec2e2a..8dbe9fb2f07 100644
--- a/apps/settings/lib/Controller/AppSettingsController.php
+++ b/apps/settings/lib/Controller/AppSettingsController.php
@@ -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();
diff --git a/apps/settings/tests/Controller/AppSettingsControllerTest.php b/apps/settings/tests/Controller/AppSettingsControllerTest.php
index e273375d76d..28d77dc3696 100644
--- a/apps/settings/tests/Controller/AppSettingsControllerTest.php
+++ b/apps/settings/tests/Controller/AppSettingsControllerTest.php
@@ -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
diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php
index c02d77dec46..788f15c183f 100644
--- a/lib/private/App/AppStore/Fetcher/Fetcher.php
+++ b/lib/private/App/AppStore/Fetcher/Fetcher.php
@@ -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) {