EventHandler::getInstance()->fireAction($this, 'getIssuesPreventingUpgrade', $parameters);
$issues = [
- ...$parameters['issues'],
$this->checkMinimumPhpVersion(),
$this->checkMaximumPhpVersion(),
$this->checkRequiredPhpExtensions(),
$this->checkMinimumDatabaseVersion(),
$this->checkMysqlNativeDriver(),
$this->checkForAppsWithDifferentDomains(),
+ $this->checkCacheSourceIsNotMemcached(),
+ $this->checkAttachmentStorage(),
+ ...$parameters['issues'],
];
return \array_filter($issues);
private function checkMaximumPhpVersion(): ?array
{
// Maximum: PHP 8.3.x
- if (\PHP_VERSION_ID > 80399) {
+ if (\PHP_VERSION_ID < 80399) {
return null;
}
}
}
+ private function checkCacheSourceIsNotMemcached(): ?array
+ {
+ if (\CACHE_SOURCE_TYPE !== 'memcached') {
+ return null;
+ }
+
+ if (WCF::getLanguage()->getFixedLanguageCode() === 'de') {
+ return [
+ 'title' => 'Eingestellte Unterstützung für Memcached',
+ 'description' => 'Memcached wird nicht mehr unterstützt, als Alternative bietet sich die Nutzung von „Redis“ an.',
+ ];
+ } else {
+ return [
+ 'title' => 'Discountinued support for Memcached',
+ 'description' => 'Memcached is no longer supported, it is recommended to switch to an alternative like “Redis”.',
+ ];
+ }
+ }
+
+ private function checkAttachmentStorage(): ?array
+ {
+
+ if (!\defined('ATTACHMENT_STORAGE') || !ATTACHMENT_STORAGE) {
+ return null;
+ }
+
+ if (WCF::getLanguage()->getFixedLanguageCode() === 'de') {
+ return [
+ 'title' => 'Alternativer Speicherort für Dateianhänge',
+ 'description' => \sprintf(
+ "Die Unterstützung für einen alternativen Speicherort von Dateianhängen wird mit dem Upgrade entfernt. Es ist notwendig die Dateianhänge in das Standardverzeichnis '%s' zu verschieben und anschließend die PHP-Konstante 'ATTACHMENT_STORAGE' zu entfernen.",
+ WCF_DIR . 'attachments/',
+ ),
+ ];
+ } else {
+ return [
+ 'title' => 'Alternative storage location for attachments',
+ 'description' => \sprintf(
+ "The support for an alternative attachment storage location will be removed during the upgrade. It is required to move the attachments into the default directory '%s' and then to remove the PHP constant 'ATTACHMENT_STORAGE'.",
+ WCF_DIR . 'attachments/',
+ ),
+ ];
+ }
+ }
+
/**
* @inheritDoc
*/
}
if ($this->isWoltLabUpdateServer()) {
- $this->data['serverURL'] = "http://update.woltlab.com/{$prefix}{$officialPath}/";
+ $this->data['serverURL'] = "https://update.woltlab.com/{$prefix}{$officialPath}/";
}
if ($this->isWoltLabStoreServer()) {
- $this->data['serverURL'] = "http://store.woltlab.com/{$prefix}{$officialPath}/";
+ $this->data['serverURL'] = "https://store.woltlab.com/{$prefix}{$officialPath}/";
}
if ($this->isWoltLabUpdateServer() || $this->isWoltLabStoreServer()) {
$this->data['isDisabled'] = 0;
if (!$woltlabUpdateServer) {
$packageServer = PackageUpdateServerEditor::create([
- 'serverURL' => "http://update.woltlab.com/{$officialPath}/",
+ 'serverURL' => "https://update.woltlab.com/{$officialPath}/",
]);
$results[$packageServer->packageUpdateServerID] = $packageServer;
}
if (!$woltlabStoreServer) {
$packageServer = PackageUpdateServerEditor::create([
- 'serverURL' => "http://store.woltlab.com/{$officialPath}/",
+ 'serverURL' => "https://store.woltlab.com/{$officialPath}/",
]);
$results[$packageServer->packageUpdateServerID] = $packageServer;
}