Skip to content

Commit 50c690b

Browse files
author
Julien Veyssier
committed
fix appstoreenabled check in Fetcher so it's coherent with AppSettingsController
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
1 parent 643e85c commit 50c690b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

apps/settings/lib/Controller/AppSettingsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function __construct(string $appName,
131131
public function viewApps(): TemplateResponse {
132132
\OC_Util::addScript('settings', 'apps');
133133
$params = [];
134-
$params['appstoreEnabled'] = $this->config->getSystemValue('appstoreenabled', true) === true;
134+
$params['appstoreEnabled'] = $this->config->getSystemValueBool('appstoreenabled', true);
135135
$params['updateCount'] = count($this->getAppsWithUpdates());
136136
$params['developerDocumentation'] = $this->urlGenerator->linkToDocs('developer-manual');
137137
$params['bundles'] = $this->getBundles();

lib/private/App/AppStore/Fetcher/Fetcher.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function __construct(Factory $appDataFactory,
9090
* @return array
9191
*/
9292
protected function fetch($ETag, $content) {
93-
$appstoreenabled = $this->config->getSystemValue('appstoreenabled', true);
93+
$appstoreenabled = $this->config->getSystemValueBool('appstoreenabled', true);
9494
if ((int)$this->config->getAppValue('settings', 'appstore-fetcher-lastFailure', '0') > time() - self::RETRY_AFTER_FAILURE_SECONDS) {
9595
return [];
9696
}
@@ -148,8 +148,8 @@ protected function fetch($ETag, $content) {
148148
* @return array
149149
*/
150150
public function get($allowUnstable = false) {
151-
$appstoreenabled = $this->config->getSystemValue('appstoreenabled', true);
152-
$internetavailable = $this->config->getSystemValue('has_internet_connection', true);
151+
$appstoreenabled = $this->config->getSystemValueBool('appstoreenabled', true);
152+
$internetavailable = $this->config->getSystemValueBool('has_internet_connection', true);
153153

154154
if (!$appstoreenabled || !$internetavailable) {
155155
return [];

0 commit comments

Comments
 (0)