From 09e2e2b72c95df85d16566d7f7f1c93827c53875 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 29 Nov 2012 12:23:04 +0100 Subject: [PATCH] Fixed domain path if installed in document root Fixes #943 --- .../system/package/PackageInstallationDispatcher.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index 8080840772..b0c9e18a25 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -624,6 +624,12 @@ class PackageInstallationDispatcher { // parse domain path $domainPath = FileUtil::getRelativePath(FileUtil::unifyDirSeperator($_SERVER['DOCUMENT_ROOT']), FileUtil::unifyDirSeperator($packageDir)); + + // work-around for applications installed in document root + if ($domainPath == './') { + $domainPath = ''; + } + $domainPath = FileUtil::addLeadingSlash(FileUtil::addTrailingSlash($domainPath)); // update application path -- 2.20.1