From: Tim Düsterhus Date: Thu, 19 May 2022 11:55:50 +0000 (+0200) Subject: Fix filename of the update scripts for 5.6 X-Git-Tag: 6.0.0_Alpha_1~1273 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=be67ef2a01d8b7ae2704a91fcb41cb9b194cd3ae;p=GitHub%2FWoltLab%2FWCF.git Fix filename of the update scripts for 5.6 --- diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_checkSystemRequirements.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_checkSystemRequirements.php deleted file mode 100644 index 6a42d30afd..0000000000 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_checkSystemRequirements.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @package WoltLabSuite\Core - */ - -use wcf\system\WCF; - -$phpVersion = \PHP_VERSION; -$neededPhpVersion = '8.1.2'; -if (!\version_compare($phpVersion, $neededPhpVersion, '>=')) { - if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { - $message = "Ihre PHP-Version '{$phpVersion}' ist unzureichend für die Installation dieser Software. PHP-Version {$neededPhpVersion} oder höher wird benötigt."; - } else { - $message = "Your PHP version '{$phpVersion}' is insufficient for installation of this software. PHP version {$neededPhpVersion} or greater is required."; - } - - throw new \RuntimeException($message); -} - -if (\PHP_INT_SIZE != 8) { - if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { - $message = "Die eingesetzte PHP-Version muss 64-Bit-Ganzzahlen unterstützen."; - } else { - $message = "The PHP version must support 64-bit integers"; - } - - throw new \RuntimeException($message); -} - -$sqlVersion = WCF::getDB()->getVersion(); -$compareSQLVersion = \preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $sqlVersion); -if (\stripos($sqlVersion, 'MariaDB') !== false) { - $neededSqlVersion = '10.5.12'; - $sqlFork = 'MariaDB'; -} else { - $sqlFork = 'MySQL'; - $neededSqlVersion = '8.0.29'; -} - -if (!\version_compare($compareSQLVersion, $neededSqlVersion, '>=')) { - if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { - $message = "Ihre {$sqlFork}-Version '{$sqlVersion}' ist unzureichend für die Installation dieser Software. {$sqlFork}-Version {$neededSqlVersion} oder höher wird benötigt."; - } else { - $message = "Your {$sqlFork} version '{$sqlVersion}' is insufficient for installation of this software. {$sqlFork} version {$neededSqlVersion} or greater is required."; - } - - throw new \RuntimeException($message); -} diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_checkUpdateServers.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_checkUpdateServers.php deleted file mode 100644 index 7b547eddbb..0000000000 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.5_checkUpdateServers.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @package WoltLabSuite\Core - */ - -use Laminas\Diactoros\Uri; -use wcf\data\package\update\server\PackageUpdateServerList; -use wcf\system\WCF; - -$list = new PackageUpdateServerList(); -$list->readObjects(); - -foreach ($list as $server) { - $uri = new Uri($server->serverURL); - - if ($uri->getScheme() !== 'https') { - if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { - $message = "Der Paketserver '{$uri}' verwendet das unverschlüsselte http-Protokoll."; - } else { - $message = "The package server '{$uri}' uses the unencrypted 'http' scheme."; - } - - throw new \RuntimeException($message); - } - if ($uri->getPort()) { - if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { - $message = "Der Paketserver '{$uri}' verwendet nicht den Standard-Port."; - } else { - $message = "The package server '{$uri}' uses a non-standard port."; - } - - throw new \RuntimeException($message); - } -} diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.6_checkSystemRequirements.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.6_checkSystemRequirements.php new file mode 100644 index 0000000000..6a42d30afd --- /dev/null +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.6_checkSystemRequirements.php @@ -0,0 +1,54 @@ + + * @package WoltLabSuite\Core + */ + +use wcf\system\WCF; + +$phpVersion = \PHP_VERSION; +$neededPhpVersion = '8.1.2'; +if (!\version_compare($phpVersion, $neededPhpVersion, '>=')) { + if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { + $message = "Ihre PHP-Version '{$phpVersion}' ist unzureichend für die Installation dieser Software. PHP-Version {$neededPhpVersion} oder höher wird benötigt."; + } else { + $message = "Your PHP version '{$phpVersion}' is insufficient for installation of this software. PHP version {$neededPhpVersion} or greater is required."; + } + + throw new \RuntimeException($message); +} + +if (\PHP_INT_SIZE != 8) { + if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { + $message = "Die eingesetzte PHP-Version muss 64-Bit-Ganzzahlen unterstützen."; + } else { + $message = "The PHP version must support 64-bit integers"; + } + + throw new \RuntimeException($message); +} + +$sqlVersion = WCF::getDB()->getVersion(); +$compareSQLVersion = \preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $sqlVersion); +if (\stripos($sqlVersion, 'MariaDB') !== false) { + $neededSqlVersion = '10.5.12'; + $sqlFork = 'MariaDB'; +} else { + $sqlFork = 'MySQL'; + $neededSqlVersion = '8.0.29'; +} + +if (!\version_compare($compareSQLVersion, $neededSqlVersion, '>=')) { + if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { + $message = "Ihre {$sqlFork}-Version '{$sqlVersion}' ist unzureichend für die Installation dieser Software. {$sqlFork}-Version {$neededSqlVersion} oder höher wird benötigt."; + } else { + $message = "Your {$sqlFork} version '{$sqlVersion}' is insufficient for installation of this software. {$sqlFork} version {$neededSqlVersion} or greater is required."; + } + + throw new \RuntimeException($message); +} diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.6_checkUpdateServers.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.6_checkUpdateServers.php new file mode 100644 index 0000000000..7b547eddbb --- /dev/null +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.6_checkUpdateServers.php @@ -0,0 +1,40 @@ + + * @package WoltLabSuite\Core + */ + +use Laminas\Diactoros\Uri; +use wcf\data\package\update\server\PackageUpdateServerList; +use wcf\system\WCF; + +$list = new PackageUpdateServerList(); +$list->readObjects(); + +foreach ($list as $server) { + $uri = new Uri($server->serverURL); + + if ($uri->getScheme() !== 'https') { + if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { + $message = "Der Paketserver '{$uri}' verwendet das unverschlüsselte http-Protokoll."; + } else { + $message = "The package server '{$uri}' uses the unencrypted 'http' scheme."; + } + + throw new \RuntimeException($message); + } + if ($uri->getPort()) { + if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { + $message = "Der Paketserver '{$uri}' verwendet nicht den Standard-Port."; + } else { + $message = "The package server '{$uri}' uses a non-standard port."; + } + + throw new \RuntimeException($message); + } +}