Attempt to fix package dir in broken environments
authorAlexander Ebert <ebert@woltlab.com>
Sat, 1 Jun 2013 16:00:18 +0000 (18:00 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 1 Jun 2013 16:00:18 +0000 (18:00 +0200)
wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php

index 98ab79ac604e0a3d135fdae0727b898ddf4ad632..81a43823065d8651e5522b99b478aa47d7b45534 100644 (file)
@@ -620,8 +620,7 @@ class PackageInstallationDispatcher {
                        $packageDir->setName('packageDir');
                        $packageDir->setLabel(WCF::getLanguage()->get('wcf.acp.package.packageDir.input'));
                        
-                       $path = RouteHandler::getPath(array('wcf', 'acp'));
-                       $defaultPath = FileUtil::addTrailingSlash(FileUtil::unifyDirSeperator($_SERVER['DOCUMENT_ROOT'] . $path));
+                       $defaultPath = FileUtil::addTrailingSlash(FileUtil::unifyDirSeperator(StringUtil::substring(WCF_DIR, 0, -4)));
                        $packageDir->setValue($defaultPath);
                        $container->appendChild($packageDir);