From b71facd9eca575e23b71d4fc07ed6495c8be043a Mon Sep 17 00:00:00 2001 From: real_nowhereman Date: Tue, 23 Sep 2008 19:48:38 +0000 Subject: [PATCH] fixed pathinfo conflict with GET parameters --- fp-plugins/prettyurls/plugin.prettyurls.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/fp-plugins/prettyurls/plugin.prettyurls.php b/fp-plugins/prettyurls/plugin.prettyurls.php index 2e80efc..8a8dfb0 100644 --- a/fp-plugins/prettyurls/plugin.prettyurls.php +++ b/fp-plugins/prettyurls/plugin.prettyurls.php @@ -266,27 +266,24 @@ class Plugin_PrettyURLs { $url = substr($url, strlen($del)-1); } - if ($url=='/') - return; - - - $matches = array(); - // removes querystrings - if ($i = strpos($url, '?')) + if (false !== $i = strpos($url, '?')) $url = substr($url, 0, $i); // removes anchors - if ($i = strpos($url, '#')) + if (false !== $i = strpos($url, '#')) $url = substr($url, 0, $i); - - + if (strrpos($url, '/') != (strlen($url)-1)) { $url .= '/'; } - - + + + if ($url=='/') + return; + + //date $url = preg_replace_callback(