From 1b9cadb91075d88ba573516b6bfb8b40f7c26955 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 7 Jun 2012 23:14:20 +0200 Subject: [PATCH] Fixed top/bottom anchors not working properly --- wcfsetup/install/files/js/WCF.js | 2 ++ wcfsetup/install/files/lib/system/WCF.class.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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; -- 2.20.1