diff --git a/src/UrbackupApiClient.php b/src/UrbackupApiClient.php index f6727ed..e6e8a7e 100644 --- a/src/UrbackupApiClient.php +++ b/src/UrbackupApiClient.php @@ -37,7 +37,7 @@ class UrbackupApiClient private string $server_version = ''; - private bool $is_version_2_5_or_higher = false; + private bool $is_version_2_4_or_higher = false; /** * Constructor. @@ -52,15 +52,10 @@ class UrbackupApiClient $this->password = (string) ($server->fields['api_password'] ?? ''); $this->ignore_ssl = ((int) ($server->fields['ignore_ssl'] ?? 0)) === 1; $this->server_version = (string) ($server->fields['server_version'] ?? ''); - $this->is_version_2_5_or_higher = $this->detectVersion2_5OrHigher(); + $this->is_version_2_4_or_higher = $this->detectVersion2_4OrHigher(); } - /** - * Detect if server version is 2.5 or higher. - * - * @return bool - */ - private function detectVersion2_5OrHigher(): bool + private function detectVersion2_4OrHigher(): bool { if ($this->server_version === '') { return false; @@ -77,7 +72,7 @@ class UrbackupApiClient if ($major > 2) { return true; } - if ($major === 2 && $minor >= 5) { + if ($major === 2 && $minor >= 4) { return true; } @@ -91,7 +86,7 @@ class UrbackupApiClient */ public function getInternetModeSettingKey(): string { - return $this->is_version_2_5_or_higher ? 'internet_mode_enabled' : 'internet_mode'; + return $this->is_version_2_4_or_higher ? 'internet_mode_enabled' : 'internet_mode'; } /**