]> git.mjollnir.org Git - s9y.git/commitdiff
* Fix a bug in the serendipity_currentURL function when Serendipity is installed...
authorgarvinhicking <garvinhicking>
Fri, 4 Nov 2005 11:46:46 +0000 (11:46 +0000)
committergarvinhicking <garvinhicking>
Fri, 4 Nov 2005 11:46:46 +0000 (11:46 +0000)
docs/NEWS
include/functions_permalinks.inc.php

index e65a72daee5a727e7fff445deefa4acacd79d82c..ebb8d5660e76ce5033de5013ab7abc40235c1cbe 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,11 @@
 Version 0.9.1 ()
 ------------------------------------------------------------------------
 
+    * Fix a bug in the serendipity_currentURL function when Serendipity
+      is installed in your HTTP root. This bug only effects the plugins karma,
+      entrysplit and multilingual on these installations.
+      Thanks to Richard Davey for spotting this! (garvinhicking)
+                      
     * Fix showing preview image of hotlinked images. Thanks to Thomas
       and RobA from the forums! (garvinhicking)
 
index 8c65e2b5eae92aea72a6214808b6ad9ea0de42ba..d408ee4273f13ea82bfec9d8510aa31c4edf499b 100644 (file)
@@ -518,7 +518,7 @@ function serendipity_currentURL() {
     if (!empty($uri['query'])) {
         $qst = '&amp;' . str_replace('&', '&amp;', $uri['query']);
     }
-    $uri['path'] = str_replace($serendipity['serendipityHTTPPath'], '', $uri['path']);
+    $uri['path'] = preg_replace('@^' . preg_quote($serendipity['serendipityHTTPPath']) . '@i', '', $uri['path']);
     $url = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?' . $uri['path'] . $qst;
     $url = str_replace(
         array(