[Mapbender-commits] r1594 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Aug 6 04:22:43 EDT 2007


Author: christoph
Date: 2007-08-06 04:22:43 -0400 (Mon, 06 Aug 2007)
New Revision: 1594

Modified:
   trunk/mapbender/http/php/mod_exportElement.php
   trunk/mapbender/http/php/mod_exportGUI.php
Log:
replaced old string functions by multibyte string function

Modified: trunk/mapbender/http/php/mod_exportElement.php
===================================================================
--- trunk/mapbender/http/php/mod_exportElement.php	2007-08-06 08:20:51 UTC (rev 1593)
+++ trunk/mapbender/http/php/mod_exportElement.php	2007-08-06 08:22:43 UTC (rev 1594)
@@ -89,7 +89,7 @@
       $insert .=  "'".$row["e_requires"]."',";
       $insert .=  "'".$row["e_url"]."'";
    $insert .=  ");\n";
-   $insert = str_replace(",,", ",NULL ,", $insert);
+   $insert = preg_replace(",,", ",NULL ,", $insert);
 }
 
 	# export element vars
@@ -114,13 +114,13 @@
       $insert .=  "'".db_escape_string($row["context"])."' ,";
       $insert .=  "'".db_escape_string($row["var_type"])."'";
    	$insert .=  ");\n";
-   	$insert = str_replace(",,", ",NULL ,", $insert);
+   	$insert = preg_replace(",,", ",NULL ,", $insert);
    	$cnt_res++;
 	}
    #------------------
 
    echo "<textarea rows=30 cols=100>";
-    echo str_replace(", ,", ",NULL ,", $insert);
+    echo preg_replace(", ,", ",NULL ,", $insert);
    echo "</textarea>";
 
 ?>

Modified: trunk/mapbender/http/php/mod_exportGUI.php
===================================================================
--- trunk/mapbender/http/php/mod_exportGUI.php	2007-08-06 08:20:51 UTC (rev 1593)
+++ trunk/mapbender/http/php/mod_exportGUI.php	2007-08-06 08:22:43 UTC (rev 1594)
@@ -114,7 +114,7 @@
 		$insert.="'".$row["e_requires"]."',";
 		$insert.="'".$row["e_url"]."'";
 		$insert.= ");\n";
-		$insert = str_replace(",,", ",NULL ,", $insert);
+		$insert = preg_replace(",,", ",NULL ,", $insert);
 	}
 	
 	
@@ -142,8 +142,8 @@
 				$insert.=", ";
 			}
 			$temp = db_escape_string($row[$i]);
-			$temp = str_replace(">","&gt;",$temp);
-			$temp = str_replace("<","&lt;",$temp);
+			$temp = preg_replace(">","&gt;",$temp);
+			$temp = preg_replace("<","&lt;",$temp);
 			$insert.="'" . $temp . "'";
 			$i++;
 		}
@@ -153,8 +153,8 @@
 
 	}
 	
-	$insert = str_replace(",,",",NULL,",$insert);
-	$insert = str_replace(", ,", ",NULL,",$insert);
+	$insert = preg_replace(",,",",NULL,",$insert);
+	$insert = preg_replace(", ,", ",NULL,",$insert);
 	
 	echo "<textarea rows=40 cols=80>";
 	echo $insert; 



More information about the Mapbender_commits mailing list