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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Aug 6 04:26:10 EDT 2007


Author: christoph
Date: 2007-08-06 04:26:09 -0400 (Mon, 06 Aug 2007)
New Revision: 1597

Modified:
   trunk/mapbender/http/php/mod_layerMetadata.php
   trunk/mapbender/http/php/mod_logout.php
   trunk/mapbender/http/php/mod_monitorCapabilities_main.php
Log:
replaced old string functions by multibyte string function

Modified: trunk/mapbender/http/php/mod_layerMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_layerMetadata.php	2007-08-06 08:25:08 UTC (rev 1596)
+++ trunk/mapbender/http/php/mod_layerMetadata.php	2007-08-06 08:26:09 UTC (rev 1597)
@@ -22,9 +22,9 @@
 db_select_db(DB,$con);
 
 function display_text($string) {
-    $string = eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\" target=_blank>\\0</a>", $string);   
-    $string = eregi_replace("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$", "<a href=\"mailto:\\0\" target=_blank>\\0</a>", $string);   
-    $string = eregi_replace("\n", "<br>", $string);
+    $string = mb_eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\" target=_blank>\\0</a>", $string);   
+    $string = mb_eregi_replace("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$", "<a href=\"mailto:\\0\" target=_blank>\\0</a>", $string);   
+    $string = mb_eregi_replace("\n", "<br>", $string);
     return $string;
 }  
 
@@ -106,7 +106,7 @@
 		$layer['Minscale'] = $row['layer_minscale'];
 		$layer['Maxscale'] = $row['layer_maxscale'];
 	}
-	$layer['Koordinatensysteme'] = str_replace(" ", ", ", getEpsgByLayerId($row['layer_id']));
+	$layer['Koordinatensysteme'] = preg_replace(" ", ", ", getEpsgByLayerId($row['layer_id']));
 //	$layer['Capabilities-Dokument'] = "<a href = '../x_geoportal/getCapabilities_document.php?wms_request=".$row['wms_id']."&layer_request=".$row['layer_pos']."' target=_blank>Capabilities-Dokument</a>";
 	if ($row['wms_timestamp']) {
 		$layer['Datum der Registrierung'] = date("d.m.Y",$row['wms_timestamp']); 

Modified: trunk/mapbender/http/php/mod_logout.php
===================================================================
--- trunk/mapbender/http/php/mod_logout.php	2007-08-06 08:25:08 UTC (rev 1596)
+++ trunk/mapbender/http/php/mod_logout.php	2007-08-06 08:26:09 UTC (rev 1597)
@@ -42,7 +42,7 @@
       header("Location: http://".$_SERVER['HTTP_HOST'].$dir."/login.php");      
    }
    else{
-      header("Location: http://".$_SERVER['HTTP_HOST'].str_replace("/php","/frames",$dir)."/login.php");
+      header("Location: http://".$_SERVER['HTTP_HOST'].preg_replace("/php","/frames",$dir)."/login.php");
    }
 }
 ?>
\ No newline at end of file

Modified: trunk/mapbender/http/php/mod_monitorCapabilities_main.php
===================================================================
--- trunk/mapbender/http/php/mod_monitorCapabilities_main.php	2007-08-06 08:25:08 UTC (rev 1596)
+++ trunk/mapbender/http/php/mod_monitorCapabilities_main.php	2007-08-06 08:26:09 UTC (rev 1597)
@@ -32,8 +32,8 @@
 
 
 function getConjunctionCharacter($onlineresource){
-	if(strstr($onlineresource, "?")) {
-		$lastChar = substr($onlineresource,strlen($onlineresource)-1, 1);  
+	if(mb_strpos($onlineresource, "?")) {
+		$lastChar = mb_substr($onlineresource,mb_strlen($onlineresource)-1, 1);  
 		if ($lastChar == "?" || $lastChar == "&") {return "";}
 		else{return "&";}
 	}
@@ -53,10 +53,10 @@
 	//command line
 	$p1 = $_SERVER["argv"][1];
 	$p2 = $_SERVER["argv"][2];
-	if (substr($p1, 0,5) == "user:") {
-		$user = substr($p1, 5);
-		if (substr($p2, 0,4) == "gui:") {
-			$gui = substr($p2, 4);
+	if (mb_substr($p1, 0,5) == "user:") {
+		$user = mb_substr($p1, 5);
+		if (mb_substr($p2, 0,4) == "gui:") {
+			$gui = mb_substr($p2, 4);
 		}
 	}
 }



More information about the Mapbender_commits mailing list