Skip to content

Commit

Permalink
fix appstoreenabled check in Fetcher so it's coherent with AppSetting…
Browse files Browse the repository at this point in the history
…sController

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
  • Loading branch information
Julien Veyssier committed Oct 15, 2021
1 parent 1119197 commit 70379ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/App/AppStore/Fetcher/Fetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function __construct(Factory $appDataFactory,
* @return array
*/
protected function fetch($ETag, $content) {
$appstoreenabled = $this->config->getSystemValue('appstoreenabled', true);
$appstoreenabled = $this->config->getSystemValue('appstoreenabled', true) === true;
if ((int)$this->config->getAppValue('settings', 'appstore-fetcher-lastFailure', '0') > time() - self::RETRY_AFTER_FAILURE_SECONDS) {
return [];
}
Expand Down Expand Up @@ -136,7 +136,7 @@ protected function fetch($ETag, $content) {
* @return array
*/
public function get($allowUnstable = false) {
$appstoreenabled = $this->config->getSystemValue('appstoreenabled', true);
$appstoreenabled = $this->config->getSystemValue('appstoreenabled', true) === true;
$internetavailable = $this->config->getSystemValue('has_internet_connection', true);

if (!$appstoreenabled || !$internetavailable) {
Expand Down

0 comments on commit 70379ab

Please sign in to comment.