Skip to content

Commit 6264815

Browse files
committed
feat: remove check for file provider.
Signed-off-by: Camila Ayres <[email protected]>
1 parent 87ed494 commit 6264815

File tree

3 files changed

+4
-53
lines changed

3 files changed

+4
-53
lines changed

index.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
$currentArch = isset($_GET['currentArch']) ? (string)$_GET['currentArch'] : "x86_64";
7474
$version = isset($_GET['version']) ? (string)$_GET['version'] : null;
7575
$isSparkle = isset($_GET['sparkle']) ? true : false;
76-
$isFileProvider = isset($_GET['fileprovider']) ? true : false;
7776
// due to a bug in an old version, the channels were translated. we need to catch them again
7877
$channel = isset($_GET['channel']) && in_array((string)$_GET['channel'], $allowedChannels, true)
7978
? (string)$_GET['channel']
@@ -105,7 +104,6 @@
105104
$kernelVersion,
106105
$channel,
107106
$isSparkle,
108-
$isFileProvider,
109107
$config
110108
);
111109
echo $response->buildResponse();

src/Response.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ class Response {
2525
private $channel;
2626
/** @var bool */
2727
private $isSparkle;
28-
/** @var bool */
29-
private $isFileProvider;
3028
/** @var array */
3129
private $config;
3230

@@ -38,7 +36,6 @@ public function __construct(string $oem,
3836
string $kernelVersion,
3937
string $channel,
4038
bool $isSparkle,
41-
bool $isFileProvider,
4239
array $config) {
4340
$this->oem = $oem;
4441
$this->platform = $platform;
@@ -48,7 +45,6 @@ public function __construct(string $oem,
4845
$this->kernelVersion = $kernelVersion;
4946
$this->channel = $channel;
5047
$this->isSparkle = $isSparkle;
51-
$this->isFileProvider = $isFileProvider;
5248
$this->config = $config;
5349
}
5450

@@ -188,22 +184,22 @@ protected function getCurrentTimeStamp() : string {
188184
* Convenience functions to get specific file provider or standard client update information
189185
*/
190186
private function getSparkleUpdateUrl(array $updateVersion) : string {
191-
$updateUrlKey = $this->isFileProvider ? 'fileProviderSparkleDownloadUrl' : 'sparkleDownloadUrl';
187+
$updateUrlKey = 'sparkleDownloadUrl';
192188
return $updateVersion[$updateUrlKey];
193189
}
194190

195191
private function getSparkleUpdateSignature(array $updateVersion) : string {
196-
$updateSignatureKey = $this->isFileProvider ? 'fileProviderSignature' : 'signature';
192+
$updateSignatureKey = 'signature';
197193
return $updateVersion[$updateSignatureKey];
198194
}
199195

200196
private function getSparkleUpdateLength(array $updateVersion) : int {
201-
$updateLengthKey = $this->isFileProvider ? 'fileProviderLength' : 'length';
197+
$updateLengthKey = 'length';
202198
return $updateVersion[$updateLengthKey];
203199
}
204200

205201
private function getSparkleVersionString(array $updateVersion) : string {
206-
$updateLengthKey = $this->isFileProvider ? 'fileProviderVersionString' : 'versionstring';
202+
$updateLengthKey = 'versionstring';
207203
return $updateVersion[$updateLengthKey];
208204
}
209205

0 commit comments

Comments
 (0)