* Searches the wcf dir.
*/
protected function searchWcfDir() {
- $foundDirectory = '';
if (self::$wcfDir) {
$wcfDir = self::$wcfDir;
}
else {
- if ($foundDirectory = FileUtil::scanFolder(INSTALL_SCRIPT_DIR, "WCF.class.php", true)) {
- $foundDirectory = $wcfDir = FileUtil::unifyDirSeperator(dirname(dirname(dirname($foundDirectory))).'/');
-
- if (dirname(dirname($wcfDir)).'/' == TMP_DIR) {
- $foundDirectory = false;
- $wcfDir = FileUtil::unifyDirSeperator(INSTALL_SCRIPT_DIR).'wcf/';
- }
- }
- else {
- $wcfDir = FileUtil::unifyDirSeperator(INSTALL_SCRIPT_DIR).'wcf/';
- }
+ $wcfDir = FileUtil::unifyDirSeperator(INSTALL_SCRIPT_DIR).'wcf/';
+ }
+
+ $invalidDirectory = false;
+ if (@is_file($wcfDir.'lib/system/WCF.class.php')) {
+ $invalidDirectory = true;
}
// domain
WCF::getTPL()->assign(array(
'nextStep' => 'unzipFiles',
- 'foundDirectory' => $foundDirectory,
+ 'invalidDirectory' => true,
'wcfDir' => $wcfDir,
'domainName' => $domainName,
'installScriptUrl' => $installScriptUrl,
* Unzips the files of the wcfsetup tar archive.
*/
protected function unzipFiles() {
- // WCF seems to be installed, skip installation of files, database
- // and admin account and go directly to the installation of packages
+ // WCF seems to be installed, abort
if (@is_file(self::$wcfDir.'lib/system/WCF.class.php')) {
- $this->gotoNextStep('installPackages');
+ throw new SystemException('Target directory seems to be an existing installation of WCF, unable to continue.');
exit;
}
// WCF not yet installed, install files first
<item name="wcf.global.systemRequirements.notActive"><![CDATA[nicht aktiviert]]></item>
<item name="wcf.global.wcfDir"><![CDATA[Installationsverzeichnis wählen]]></item>
<item name="wcf.global.wcfDir.description"><![CDATA[In das Installationsverzeichnis werden alle Dateien von <b>WoltLab Community Framework</b> entpackt.]]></item>
- <item name="wcf.global.wcfDir.foundDirectory"><![CDATA[Die Installation vermutet eine bereits vorhandene Installation von <b>WoltLab Community Framework</b> im Ordner „{$foundDirectory}“.<br />Bitte überprüfen Sie diese Angabe bzw. definieren Sie ein anderes Installationsverzeichnis, wenn Sie eine neue Kopie von <b>WoltLab Community Framework</b> installieren möchten.]]></item>
<item name="wcf.global.wcfDir.dir"><![CDATA[Installationsverzeichnis]]></item>
<item name="wcf.global.wcfDir.dir.description"><![CDATA[Wenn Sie unsicher sind, belassen sie den vom System vorgegebenen Namen und führen die Standard-Installation durch.]]></item>
<item name="wcf.global.wcfDir.error.invalid"><![CDATA[Das eingegebene Verzeichnis ist ungültig.]]></item>
+ <item name="wcf.global.wcfDir.error.invalidDirectory"><![CDATA[Die Installation vermutet eine bereits vorhandene Installation von <b>WoltLab Community Framework</b> im Verzeichnis „{$wcfDir}“.<br />Bitte definieren Sie ein anderes Installationsverzeichnis um die Installation fortzusetzen.]]></item>
<item name="wcf.global.wcfDir.url"><![CDATA[Installationsadresse (URL)]]></item>
<item name="wcf.global.wcfDir.url.description"><![CDATA[Nach der Installation in das angegebene Installationsverzeichnis ist <b>WoltLab Community Framework</b> über diese Adresse (URL) erreichbar.]]></item>
<item name="wcf.global.next"><![CDATA[Lade nächsten Schritt ...]]></item>
<item name="wcf.global.systemRequirements.notActive"><![CDATA[Not enabled]]></item>
<item name="wcf.global.wcfDir"><![CDATA[Choose the installation-folder]]></item>
<item name="wcf.global.wcfDir.description"><![CDATA[All files of <b>WoltLab Community Framework</b> will be extracted into the installation-folder.]]></item>
- <item name="wcf.global.wcfDir.foundDirectory"><![CDATA[The installation-assistant has found a previous installation of <b>WoltLab Community Framework</b> in the “{$foundDirectory}” folder.<br />If you would like to install a new copy of the <b>WoltLab Community Framework</b>, then please enter an alternative installation folder.]]></item>
<item name="wcf.global.wcfDir.dir"><![CDATA[Installation-folder]]></item>
<item name="wcf.global.wcfDir.dir.description"><![CDATA[If you are unsure, keep the name which the system suggests and run the standard-installation.]]></item>
<item name="wcf.global.wcfDir.error.invalid"><![CDATA[The given folder is not valid.]]></item>
+ <item name="wcf.global.wcfDir.error.invalidDirectory"><![CDATA[The installation-assistant has found a previous installation of <b>WoltLab Community Framework</b> in the “{$wcfDir}” folder.<br />Please enter an alternative installation folder to continue installation.]]></item>
<item name="wcf.global.wcfDir.url"><![CDATA[Installation-address (URL)]]></item>
<item name="wcf.global.wcfDir.url.description"><![CDATA[After the installation into the given folder you will be able to access <b>WoltLab Community Framework</b> through this address (URL).]]></item>
<item name="wcf.global.next"><![CDATA[Loading next step ...]]></item>
</hgroup>
</header>
-{if $foundDirectory}
- <p class="info">{lang}wcf.global.wcfDir.foundDirectory{/lang}</p>
+{if $invalidDirectory}
+ <p class="error">{lang}wcf.global.wcfDir.error.invalidDirectory{/lang}</p>
{/if}
{if $exception|isset}