[Mapbender-commits] r1579 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Aug 6 03:52:14 EDT 2007
Author: christoph
Date: 2007-08-06 03:52:14 -0400 (Mon, 06 Aug 2007)
New Revision: 1579
Modified:
trunk/mapbender/http/classes/class_gml2.php
Log:
replaced old string functions by multibyte string function
Modified: trunk/mapbender/http/classes/class_gml2.php
===================================================================
--- trunk/mapbender/http/classes/class_gml2.php 2007-08-06 07:51:25 UTC (rev 1578)
+++ trunk/mapbender/http/classes/class_gml2.php 2007-08-06 07:52:14 UTC (rev 1579)
@@ -66,16 +66,16 @@
xml_parser_free($parser);
foreach ($values as $element) {
- if(strtoupper($this->sepNameSpace($element[tag])) == strtoupper("boundedBy") && $element[type] == "open"){
+ if(mb_strtoupper($this->sepNameSpace($element[tag])) == mb_strtoupper("boundedBy") && $element[type] == "open"){
$boundedBy = true;
}
if ($boundedBy) {
- if(strtoupper($this->sepNameSpace($element[tag])) == strtoupper("coordinates")){
- $this->bbox = explode(",", str_replace(",,","",str_replace(" ",",",trim($element[value]))));
+ if(mb_strtoupper($this->sepNameSpace($element[tag])) == mb_strtoupper("coordinates")){
+ $this->bbox = explode(",", preg_replace(",,","",preg_replace(" ",",",trim($element[value]))));
$boundedBy=false;
}
}
- if(strtoupper($this->sepNameSpace($element[tag])) == strtoupper("featureMember") && $element[type] == "open"){
+ if(mb_strtoupper($this->sepNameSpace($element[tag])) == mb_strtoupper("featureMember") && $element[type] == "open"){
$this->member++;
$this->keys[$this->member] = array();
$this->value[$this->member] = array();
@@ -93,15 +93,15 @@
$geom = false;
}
if($geom == true){
- if (strtoupper($this->sepNameSpace($element[tag])) == strtoupper("coordinates")) {
- $this->geometry[$this->member][$cnt_geom] = str_replace(",,","",str_replace(" ",",",trim($element[value])));
+ if (mb_strtoupper($this->sepNameSpace($element[tag])) == mb_strtoupper("coordinates")) {
+ $this->geometry[$this->member][$cnt_geom] = preg_replace(",,","",preg_replace(" ",",",trim($element[value])));
$coordinates = true;
// XXX: Increment counter to get all geometries of a feature member,
// comment it out to only show first geometry of featuremember
$cnt_geom++;
}
else if (!$coordinates && trim($element[value])) {
- $coords = str_replace(",,","",str_replace(" ",",",trim($element[value])));
+ $coords = preg_replace(",,","",preg_replace(" ",",",trim($element[value])));
$tmp_array = explode(",", $coords);
if (count($tmp_array > 1)) {
$this->geometry[$this->member][$cnt_geom] = $coords;
@@ -112,7 +112,7 @@
}
}
}
- else if(strtoupper($this->sepNameSpace($element[tag])) == strtoupper("featureMember") && $element[type] == "close"){
+ else if(mb_strtoupper($this->sepNameSpace($element[tag])) == mb_strtoupper("featureMember") && $element[type] == "close"){
$section = false;
$el = -1;
}
@@ -126,9 +126,9 @@
}
function sepNameSpace($s){
- $c = strpos($s,":");
+ $c = mb_strpos($s,":");
if($c>0){
- return substr($s,$c+1);
+ return mb_substr($s,$c+1);
}
else{
return $s;
More information about the Mapbender_commits
mailing list