[Mapbender-commits] r1599 - trunk/mapbender/http/print

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Aug 6 04:28:45 EDT 2007


Author: christoph
Date: 2007-08-06 04:28:44 -0400 (Mon, 06 Aug 2007)
New Revision: 1599

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

removed call by reference (deprecated, thanks to Peter Hopfgartner)

Modified: trunk/mapbender/http/print/mod_printPDF_pdf.php
===================================================================
--- trunk/mapbender/http/print/mod_printPDF_pdf.php	2007-08-06 08:27:00 UTC (rev 1598)
+++ trunk/mapbender/http/print/mod_printPDF_pdf.php	2007-08-06 08:28:44 UTC (rev 1599)
@@ -130,7 +130,7 @@
 $border = 0.8 * $DPC;
 
 if($matching == true){
-   $urls = str_replace($pattern,$replacement,$_REQUEST["map_url"]);  
+   $urls = preg_replace($pattern,$replacement,$_REQUEST["map_url"]);  
 }
 else{
    $urls = $_REQUEST["map_url"];
@@ -149,12 +149,12 @@
 		$m->set('width',(intval($m->get('width'))*4));
 		$m->set('height',(intval($m->get('height'))*4));
 		if(in_array($m->get('map'),$highqualitymapfiles)){	
-			$m->set('map',str_replace(".map","_4.map",$m->get('map')));			
+			$m->set('map',preg_replace(".map","_4.map",$m->get('map')));			
 		}
 		$array_urls[$i] = $m->url;
 	}
 }
-$coord = split(",",$map_extent);
+$coord = mb_split(",",$map_extent);
 
 // analyse overview url and draw rectangle with position
 $o_url = new stripRequest($overview_url);
@@ -165,13 +165,13 @@
 	$o_url->set('width',(intval($o_url->get('width'))*4));
 	$o_url->set('height',(intval($o_url->get('height'))*4));
 	if(in_array($o_url->get('map'),$highqualitymapfiles)){	
-			$o_url->set('map',str_replace(".map","_4.map",$o_url->get('map')));		
+			$o_url->set('map',preg_replace(".map","_4.map",$o_url->get('map')));		
 			$overview_url = $o_url->url;	
 	}
 }
 
 if($matching == true){
-	$overview_url = str_replace($pattern,$replacement,$overview_url);  
+	$overview_url = preg_replace($pattern,$replacement,$overview_url);  
 }
 
 
@@ -299,7 +299,7 @@
 }
 $pdf = new Cezpdf();
 
-$pdf->Cezpdf(strtolower($size),$format);
+$pdf->Cezpdf(mb_strtolower($size),$format);
 $diff=array(196=>'Adieresis',228=>'adieresis',
    214=>'Odieresis',246=>'odieresis',
    220=>'Udieresis',252=>'udieresis',
@@ -351,8 +351,8 @@
    );
 
 if ($_REQUEST["measured_x_values"]!=''){
-	addMeasuredItem(&$pdf, $_REQUEST["measured_x_values"], $_REQUEST["measured_y_values"], $theMeasureConfigArray);
-	hideElementsOutsideMapframe(&$pdf);
+	addMeasuredItem($pdf, $_REQUEST["measured_x_values"], $_REQUEST["measured_y_values"], $theMeasureConfigArray);
+	hideElementsOutsideMapframe($pdf);
 }
 
 # dashed line
@@ -519,7 +519,7 @@
 
 if ($overview==true){
 	// analyse request, draw rectancle
-	$filename = str_replace("map_","overview_",$filename);
+	$filename = preg_replace("map_","overview_",$filename);
 	if($size == "A4" && $format == "portrait"){
 		$i = new weldOverview2PNG($overview_url,$array_urls[0] ,$filename);
 
@@ -668,7 +668,7 @@
 	$my_wms_title = explode("___",$new_wms_title);
 	$my_layers = explode("___",$new_layers);
 	if($matching == true){
-        $my_legend = str_replace($pattern,$replacement,$_REQUEST["legendurl"]);  
+        $my_legend = preg_replace($pattern,$replacement,$_REQUEST["legendurl"]);  
     }
     else{
         $my_legend = $_REQUEST["legendurl"];



More information about the Mapbender_commits mailing list