use wcf\data\package\PackageCache;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\HTTPUnauthorizedException;
+use wcf\system\exception\NamedUserException;
use wcf\system\exception\SystemException;
use wcf\system\io\File;
use wcf\system\WCF;
*/
protected function findShortestUpdateThread($package, $fromversions, $currentVersion, $newVersion) {
if (!isset($fromversions[$newVersion])) {
- throw new SystemException("An update of package ".$package." from version ".$currentVersion." to ".$newVersion." is not supported.");
+ throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.acp.package.update.path.unknown', [
+ 'currentVersion' => $currentVersion,
+ 'newVersion' => $newVersion,
+ 'package' => $package,
+ 'packageName' => PackageCache::getInstance()->getPackageByIdentifier($package)->getName(),
+ ]));
}
// find direct update
}
if (empty($updateThreadList)) {
- throw new SystemException("An update of package ".$package." from version ".$currentVersion." to ".$newVersion." is not supported.");
+ throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.acp.package.update.path.incoherent', [
+ 'currentVersion' => $currentVersion,
+ 'newVersion' => $newVersion,
+ 'package' => $package,
+ 'packageName' => PackageCache::getInstance()->getPackageByIdentifier($package)->getName(),
+ ]));
}
// sort by length
<item name="wcf.acp.package.update.excludedPackages.excluding"><![CDATA[Zu installierende Pakete]]></item>
<item name="wcf.acp.package.update.excludedPackages.excluding.description"><![CDATA[Die folgenden zu installierenden Pakete sind mit installierten Paketen nicht kompatibel]]></item>
<item name="wcf.acp.package.update.excludedPackages.excluding.package"><![CDATA[„{$excludedPackage[packageName]}“ in Version „{$excludedPackage[packageVersion]}“ ist mit dem bereits installieren Paket „{$excludedPackage[existingPackageName]}“ nicht kompatibel]]></item>
+ <item name="wcf.acp.package.update.path.incoherent"><![CDATA[Das Update erfordert eine Aktualisierung des Paketes „{$packageName}“ (installierte Version: {$currentVersion}) auf Version {$newVersion}, es wurden aber keine passenden Updates gefunden.]]></item>
+ <item name="wcf.acp.package.update.path.unknown"><![CDATA[Das Update erfordert eine Aktualisierung des Paketes „{$packageName}“ (installierte Version: {$currentVersion}) auf Version {$newVersion}, es wurden aber keine verfügbaren Updates gefunden. Möglicherweise fehlt der passende Paket-Server?]]></item>
<item name="wcf.acp.package.version"><![CDATA[Version]]></item>
<item name="wcf.acp.package.packageDir.input"><![CDATA[Installationsverzeichnis]]></item>
<item name="wcf.acp.package.upload"><![CDATA[Paket hochladen]]></item>
<item name="wcf.acp.package.update.excludedPackages.excluding"><![CDATA[Packages to be installed]]></item>
<item name="wcf.acp.package.update.excludedPackages.excluding.description"><![CDATA[The following packages to be installed are not compatible with the currently installed packages.]]></item>
<item name="wcf.acp.package.update.excludedPackages.excluding.package"><![CDATA[“{$excludedPackage[packageName]}” in version “{$excludedPackage[packageVersion]}” cannot be installed because it is incompatible with the installed package “{$excludedPackage[existingPackageName]}”.]]></item>
+ <item name="wcf.acp.package.update.path.incoherent"><![CDATA[The update requires the newer version {$newVersion} of the package “{$packageName}” (installed version: {$currentVersion}), but there is no such update available.]]></item>
+ <item name="wcf.acp.package.update.path.unknown"><![CDATA[The update requires the newer version {$newVersion} of the package “{$packageName}” (installed version: {$currentVersion}), but no such update could be found. Perhaps you are missing the required package server?]]></item>
<item name="wcf.acp.package.version"><![CDATA[Version]]></item>
<item name="wcf.acp.package.packageDir.input"><![CDATA[Installation Directory]]></item>
<item name="wcf.acp.package.upload"><![CDATA[Upload package]]></item>