[Mapbender-commits] r2309 - branches/2.5/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Mar 28 07:03:47 EDT 2008


Author: christoph
Date: 2008-03-28 07:03:47 -0400 (Fri, 28 Mar 2008)
New Revision: 2309

Modified:
   branches/2.5/http/classes/class_stripRequest.php
Log:
reverted to str_replace

pattern was not properly escaped!

example pattern that failed "/image/png/"


Modified: branches/2.5/http/classes/class_stripRequest.php
===================================================================
--- branches/2.5/http/classes/class_stripRequest.php	2008-03-28 10:05:33 UTC (rev 2308)
+++ branches/2.5/http/classes/class_stripRequest.php	2008-03-28 11:03:47 UTC (rev 2309)
@@ -39,8 +39,8 @@
 			$tmp = explode("=", $patterns[$i]);
 			if(mb_strtoupper($tmp[0]) == mb_strtoupper($key)){
 				$replacement = mb_strtoupper($key) . "=" . $value;
-				$currentPattern = "/" . $patterns[$i] . "/";
-				$this->url = preg_replace($currentPattern, $replacement, $this->url);
+				$currentPattern = $patterns[$i];
+				$this->url = str_replace($currentPattern, $replacement, $this->url);
 				$exists = true;
 			}
 		}



More information about the Mapbender_commits mailing list