From: Alexander Ebert Date: Thu, 7 Jun 2012 21:14:20 +0000 (+0200) Subject: Fixed top/bottom anchors not working properly X-Git-Tag: 2.0.0_Beta_1~1007^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1b9cadb91075d88ba573516b6bfb8b40f7c26955;p=GitHub%2FWoltLab%2FWCF.git Fixed top/bottom anchors not working properly --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 7625f68c5e..baad301f16 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -3357,6 +3357,8 @@ WCF.Effect.SmoothScroll = WCF.Effect.Scroll.extend({ $('a[href$=#top],a[href$=#bottom]').click(function() { var $target = $(this.hash); self.scrollTo($target, true); + + return false; }); } }); diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index a9f9dda1ab..03f532c4b2 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -643,7 +643,7 @@ class WCF { $scriptName = substr($scriptName, 0, strrpos($scriptName, '/')); } - $path = str_replace($scriptName, '', $_SERVER['REQUEST_URI']); + $path = str_replace('/index.php', '', str_replace($scriptName, '', $_SERVER['REQUEST_URI'])); $baseHref = self::getTPL()->get('baseHref'); return $baseHref . 'index.php' . $path . '#' . $fragment;