Removed detection of existing WCF directories
authorAlexander Ebert <ebert@woltlab.com>
Mon, 11 Feb 2013 16:16:07 +0000 (17:16 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 11 Feb 2013 16:16:07 +0000 (17:16 +0100)
Fixes #1128

wcfsetup/install/files/lib/system/WCFSetup.class.php
wcfsetup/setup/lang/setup_de.xml
wcfsetup/setup/lang/setup_en.xml
wcfsetup/setup/template/stepSearchWcfDir.tpl

index 9edd8463e112845ced01b7d721a2175bee399fab..4b71822be07191095abd034e9d15c5231686b411 100644 (file)
@@ -449,22 +449,16 @@ class WCFSetup extends WCF {
         * 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
@@ -478,7 +472,7 @@ class WCFSetup extends WCF {
                
                WCF::getTPL()->assign(array(
                        'nextStep' => 'unzipFiles',
-                       'foundDirectory' => $foundDirectory,
+                       'invalidDirectory' => true,
                        'wcfDir' => $wcfDir,
                        'domainName' => $domainName,
                        'installScriptUrl' => $installScriptUrl,
@@ -492,10 +486,9 @@ class WCFSetup extends WCF {
         * 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
index 6aa16e90c22af5270578087a752fec5403d20dc9..39975639c3c7affe20d085e6d59b9f2400eac92c 100644 (file)
                <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>
index 2b8edca4042db0d41a12e76b1461ed856f2b87d3..e6cac48b2737bea38b17d99e20d260c5fb3d5506 100644 (file)
                <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>
index e4942ec3cd4a945d4ccbaf444671f237778344d4..42be50e817e9d731cb362cde865fbbcdd4bf37dc 100644 (file)
@@ -87,8 +87,8 @@
        </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}