Skip to content

Commit 7baa8d7

Browse files
committed
fix: disable web logic
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
1 parent ba3d5f9 commit 7baa8d7

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

index.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ public function __construct(
7070

7171
[$this->configValues] = $this->readConfigFile();
7272

73-
if (PHP_SAPI !== 'cli' && ($this->configValues['upgrade.disable-web'] ?? false) !== true) {
74-
// updater disabled
75-
$this->disabled = true;
76-
return;
73+
if (PHP_SAPI !== 'cli') {
74+
$this->disabled = (bool)($this->configValues['upgrade.disable-web'] ?? false);
75+
if ($this->disabled) {
76+
// Updater disabled
77+
return;
78+
}
7779
}
7880

7981
$dataDir = $this->getUpdateDirectoryLocation();

lib/Updater.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ public function __construct(
5252

5353
[$this->configValues] = $this->readConfigFile();
5454

55-
if (PHP_SAPI !== 'cli' && ($this->configValues['upgrade.disable-web'] ?? false) !== true) {
56-
// updater disabled
57-
$this->disabled = true;
58-
return;
55+
if (PHP_SAPI !== 'cli') {
56+
$this->disabled = (bool)($this->configValues['upgrade.disable-web'] ?? false);
57+
if ($this->disabled) {
58+
// Updater disabled
59+
return;
60+
}
5961
}
6062

6163
$dataDir = $this->getUpdateDirectoryLocation();

updater.phar

34 Bytes
Binary file not shown.

vendor/composer/autoload_static.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ComposerStaticInitcbbead1010db4afef500f7adc2b6cac3
1616
);
1717

1818
public static $prefixLengthsPsr4 = array (
19-
'S' =>
19+
'S' =>
2020
array (
2121
'Symfony\\Polyfill\\Mbstring\\' => 26,
2222
'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
@@ -26,58 +26,58 @@ class ComposerStaticInitcbbead1010db4afef500f7adc2b6cac3
2626
'Symfony\\Component\\String\\' => 25,
2727
'Symfony\\Component\\Console\\' => 26,
2828
),
29-
'P' =>
29+
'P' =>
3030
array (
3131
'Psr\\Container\\' => 14,
3232
),
33-
'N' =>
33+
'N' =>
3434
array (
3535
'NC\\Updater\\' => 11,
3636
),
37-
'B' =>
37+
'B' =>
3838
array (
3939
'Bamarni\\Composer\\Bin\\' => 21,
4040
),
4141
);
4242

4343
public static $prefixDirsPsr4 = array (
44-
'Symfony\\Polyfill\\Mbstring\\' =>
44+
'Symfony\\Polyfill\\Mbstring\\' =>
4545
array (
4646
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
4747
),
48-
'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
48+
'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
4949
array (
5050
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
5151
),
52-
'Symfony\\Polyfill\\Intl\\Grapheme\\' =>
52+
'Symfony\\Polyfill\\Intl\\Grapheme\\' =>
5353
array (
5454
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme',
5555
),
56-
'Symfony\\Polyfill\\Ctype\\' =>
56+
'Symfony\\Polyfill\\Ctype\\' =>
5757
array (
5858
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
5959
),
60-
'Symfony\\Contracts\\Service\\' =>
60+
'Symfony\\Contracts\\Service\\' =>
6161
array (
6262
0 => __DIR__ . '/..' . '/symfony/service-contracts',
6363
),
64-
'Symfony\\Component\\String\\' =>
64+
'Symfony\\Component\\String\\' =>
6565
array (
6666
0 => __DIR__ . '/..' . '/symfony/string',
6767
),
68-
'Symfony\\Component\\Console\\' =>
68+
'Symfony\\Component\\Console\\' =>
6969
array (
7070
0 => __DIR__ . '/..' . '/symfony/console',
7171
),
72-
'Psr\\Container\\' =>
72+
'Psr\\Container\\' =>
7373
array (
7474
0 => __DIR__ . '/..' . '/psr/container/src',
7575
),
76-
'NC\\Updater\\' =>
76+
'NC\\Updater\\' =>
7777
array (
7878
0 => __DIR__ . '/../..' . '/lib',
7979
),
80-
'Bamarni\\Composer\\Bin\\' =>
80+
'Bamarni\\Composer\\Bin\\' =>
8181
array (
8282
0 => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src',
8383
),

0 commit comments

Comments
 (0)