From 6b2f5a591f0abb35ff51a37e13e085cc441723c8 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 31 Dec 2012 17:39:29 +0100 Subject: [PATCH] Fixed WCF::getAnchor() Fixes #1060 --- wcfsetup/install/files/lib/system/WCF.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index 81e684e816..70b0ed763a 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -676,9 +676,14 @@ class WCF { if (!StringUtil::isASCII($path) && !StringUtil::isUTF8($path)) { $path = StringUtil::convertEncoding('ISO-8859-1', 'UTF-8', $path); } + $path = FileUtil::removeLeadingSlash($path); $baseHref = self::getTPL()->get('baseHref'); - return $baseHref . FileUtil::removeLeadingSlash($path) . '#' . $fragment; + if (!empty($path) && StringUtil::indexOf($path, '?') !== 0) { + $baseHref .= 'index.php/'; + } + + return $baseHref . $path . '#' . $fragment; } /** -- 2.20.1