fixed 31 compability, close #177

This commit is contained in:
benson
2025-03-09 07:33:34 +08:00
parent 5f97dd0381
commit 05fa403bd9

View File

@@ -516,7 +516,9 @@ class Helper
}
public static function getVersion(): array
{
return \OC_Util::getVersion();
$config = \OC::$server->get(\OCP\IConfig::class);
$version = $config->getSystemValue('version');
return explode(".", $version);
}
public static function isLegacyVersion(): bool
{
@@ -634,7 +636,7 @@ class Helper
$response = $client->request('GET', $downloadUrl);
if ($byte = file_put_contents($file, $response->getContent())) {
return $byte;
}else {
} else {
throw new \Exception("Failed to download $downloadUrl");
}
}