[Mapbender-commits] r1591 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Aug 6 04:05:15 EDT 2007
Author: christoph
Date: 2007-08-06 04:05:15 -0400 (Mon, 06 Aug 2007)
New Revision: 1591
Modified:
trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php
trunk/mapbender/http/javascripts/mod_insertLayerPreviewIntoDb.php
trunk/mapbender/http/javascripts/mod_poi.php
trunk/mapbender/http/javascripts/mod_scaleHint.php
Log:
replaced old string functions by multibyte string function
Modified: trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php 2007-08-06 08:04:03 UTC (rev 1590)
+++ trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php 2007-08-06 08:05:15 UTC (rev 1591)
@@ -79,7 +79,7 @@
$kml->createKMLFromObj();
$sql = "INSERT INTO mb_meetingpoint VALUES ($1, $2, $3, $4, $5, $6)";
- $v = array($kml->kml_id, $wmc_id, str_replace("&", "&" , html_entity_decode($kml->kml)), $_SESSION["mb_user_id"], $_SESSION["mb_user_password"], $gui_id);
+ $v = array($kml->kml_id, $wmc_id, preg_replace("&", "&" , html_entity_decode($kml->kml)), $_SESSION["mb_user_id"], $_SESSION["mb_user_password"], $gui_id);
$t = array('s', 's', 's', 'i', 's', 's');
$res = db_prep_query($sql, $v, $t);
@@ -93,7 +93,7 @@
}
$filename = "../tmp/".$kml->kml_id.'.kml';
$handle = fopen($filename, "w");
- fputs($handle, str_replace("&", "&" , html_entity_decode($kml->kml)));
+ fputs($handle, preg_replace("&", "&" , html_entity_decode($kml->kml)));
fclose($handle);
echo "Please feel free to add the <a href = 'http://".$_SERVER['HTTP_HOST']."/mburl/".$kml->kml_id."'>link</a> to your meeting point to your website.<br><br>";
Modified: trunk/mapbender/http/javascripts/mod_insertLayerPreviewIntoDb.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_insertLayerPreviewIntoDb.php 2007-08-06 08:04:03 UTC (rev 1590)
+++ trunk/mapbender/http/javascripts/mod_insertLayerPreviewIntoDb.php 2007-08-06 08:05:15 UTC (rev 1591)
@@ -40,7 +40,7 @@
array_push($search, chr(10));
array_push($replace, '\\012');
- $binData = str_replace($search, $replace, $binData);
+ $binData = preg_replace($search, $replace, $binData);
return $binData;
}
@@ -51,8 +51,8 @@
$mapurl = $d[0];
$legendurl = $d[1];
- $mapurl = eregi_replace("(&width=)[0-9]+($|[^0-9])", "\\1200\\2", $mapurl);
- $mapurl = eregi_replace("(&height=)[0-9]+($|[^0-9])", "\\1200\\2", $mapurl);
+ $mapurl = mb_eregi_replace("(&width=)[0-9]+($|[^0-9])", "\\1200\\2", $mapurl);
+ $mapurl = mb_eregi_replace("(&height=)[0-9]+($|[^0-9])", "\\1200\\2", $mapurl);
$adm = new administration();
$layer_id = $_SESSION['layer_preview'];
Modified: trunk/mapbender/http/javascripts/mod_poi.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_poi.php 2007-08-06 08:04:03 UTC (rev 1590)
+++ trunk/mapbender/http/javascripts/mod_poi.php 2007-08-06 08:05:15 UTC (rev 1591)
@@ -110,7 +110,7 @@
function validate(){
if(document.form1.search.value.length < 1){
- alert("Bitte vervollständigen Sie die Angaben!");
+ alert("Bitte vervollst�ndigen Sie die Angaben!");
document.form1.search.focus();
return false;
}
@@ -219,7 +219,7 @@
$md_fileidentifier[$cnt] = pg_result($res,$cnt,"md_fileidentifier"); # Layername
$layername[$cnt] = pg_result($res,$cnt,"md_fileidentifier"); # Layername in der Mapdatei
$result_title[$cnt] = pg_result($res,$cnt,"\"".$title."\""); # layer_deutsch Ergebnisname
- $search_columns[$cnt] = pg_result($res,$cnt,"search_columns"); # Suchspalten, Trennung über ,
+ $search_columns[$cnt] = pg_result($res,$cnt,"search_columns"); # Suchspalten, Trennung �ber ,
$search_result[$cnt] = pg_result($res,$cnt,"search_result"); # Ergebnisspalte
$search_keywords[$cnt] = pg_result($res,$cnt,"search_keywords"); # Ergebnisspalte
$wms_title[$cnt] = pg_result($res,$cnt,"wms_title"); # WMS tile
@@ -248,13 +248,13 @@
$sql = "Select * FROM ".$table[$i]." LIMIT 1";
$res = pg_query($con,$sql);
- if(strtoupper($type) =='MULTIPOLYGON'){
+ if(mb_strtoupper($type) =='MULTIPOLYGON'){
$sql1 = "SELECT '". $layername[$i]."' as fkey_md_fileidentifier,".$search_result[$i].", '".$wms_title[$i]."' as wms_title, X(Centroid(the_geom)) as x,Y(Centroid(the_geom)) as y FROM ".$table[$i];
}
- if(strtoupper($type) =='MULTILINESTRING'){
+ if(mb_strtoupper($type) =='MULTILINESTRING'){
$sql1 = "SELECT '". $layername[$i]."' as fkey_md_fileidentifier,".$search_result[$i].",'".$wms_title[$i]."' as wms_title, X(Centroid(the_geom)) as x,Y(Centroid(the_geom)) as y FROM ".$table[$i];
}
- if(strtoupper($type)=='POINT'){
+ if(mb_strtoupper($type)=='POINT'){
$sql1 = "SELECT '". $layername[$i]."' as fkey_md_fileidentifier,".$search_result[$i].",'".$wms_title[$i]."' as wms_title, X(the_geom) as x,Y(the_geom) as y FROM ".$table[$i];
}
Modified: trunk/mapbender/http/javascripts/mod_scaleHint.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_scaleHint.php 2007-08-06 08:04:03 UTC (rev 1590)
+++ trunk/mapbender/http/javascripts/mod_scaleHint.php 2007-08-06 08:05:15 UTC (rev 1591)
@@ -34,7 +34,7 @@
if($cnt > 1){
echo "alert('mod_scaleHint: ID not unique!');";
}
-$params = split(",",$e_target);
+$params = mb_split(",",$e_target);
echo "var mod_scaleHint_target = '".$params[0]."';";
echo "var mod_scaleHint_min = '".$params[1]."';";
More information about the Mapbender_commits
mailing list