[Mapbender-commits] r1578 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Aug 6 03:51:25 EDT 2007
Author: christoph
Date: 2007-08-06 03:51:25 -0400 (Mon, 06 Aug 2007)
New Revision: 1578
Modified:
trunk/mapbender/http/classes/class_gml.php
Log:
replaced old string functions by multibyte string function
Modified: trunk/mapbender/http/classes/class_gml.php
===================================================================
--- trunk/mapbender/http/classes/class_gml.php 2007-08-06 07:50:45 UTC (rev 1577)
+++ trunk/mapbender/http/classes/class_gml.php 2007-08-06 07:51:25 UTC (rev 1578)
@@ -112,7 +112,7 @@
function parseGml($index){
- $data = str_replace("&", "&", $this->gml[$index]);
+ $data = preg_replace("&", "&", $this->gml[$index]);
$this->tagList = array_merge($this->multi, $this->pointSingle, $this->lineSingle, $this->polygonSingle);
@@ -137,32 +137,32 @@
foreach ($values as $element) {
- if(strtoupper($element['tag']) == strtoupper("gml:featureMember") && $element['type'] == "open"){
+ if(mb_strtoupper($element['tag']) == mb_strtoupper("gml:featureMember") && $element['type'] == "open"){
$member = true;
}
- if (in_array(strtoupper($element['tag']),$this->tagList) && $element['type'] == "open" && $member==true && $geom==false && $typeset==false) {
+ if (in_array(mb_strtoupper($element['tag']),$this->tagList) && $element['type'] == "open" && $member==true && $geom==false && $typeset==false) {
$this->geomColl[$index]->addGeometryMember($element['tag']);
$typeset=true;
}
- if(in_array(strtoupper($element['tag']),$this->pointSingle) && $element['type'] == "open" && $typeset==true){
+ if(in_array(mb_strtoupper($element['tag']),$this->pointSingle) && $element['type'] == "open" && $typeset==true){
$foundGeom = true;
$geom = true;
$this->geomColl[$index]->addPoint();
}
- if(in_array(strtoupper($element['tag']),$this->lineSingle) && $element['type'] == "open" && $typeset==true){
+ if(in_array(mb_strtoupper($element['tag']),$this->lineSingle) && $element['type'] == "open" && $typeset==true){
$foundGeom = true;
$geom = true;
$this->geomColl[$index]->addLine();
}
- if(in_array(strtoupper($element['tag']),$this->polygonSingle) && $element['type'] == "open" && $typeset==true){
+ if(in_array(mb_strtoupper($element['tag']),$this->polygonSingle) && $element['type'] == "open" && $typeset==true){
$foundGeom = true;
$geom = true;
$this->geomColl[$index]->addPolygon();
}
- if(strtoupper($element['tag']) == strtoupper("gml:coordinates") && $geom == true){
+ if(mb_strtoupper($element['tag']) == mb_strtoupper("gml:coordinates") && $geom == true){
$myGeom = $this->prepareCoordinates($element['value']);
$coord = explode(",",$myGeom);
for($i=0;$i<count($coord)-1; $i += 2){
@@ -171,22 +171,22 @@
}
}
- if(strtoupper($element['tag']) == strtoupper("label")){
+ if(mb_strtoupper($element['tag']) == mb_strtoupper("label")){
$this->geomColl[$index]->addLabel($element['value']);
}
- if ($foundGeom == true && $geom == false && substr($element['tag'], 0, 4) != "gml:" && isset($element['value'])) {
+ if ($foundGeom == true && $geom == false && mb_substr($element['tag'], 0, 4) != "gml:" && isset($element['value'])) {
$this->geomColl[$index]->addAttribute($element['tag'], $element['value']);
}
- if((in_array(strtoupper($element['tag']),$this->pointSingle)
- || in_array(strtoupper($element['tag']),$this->lineSingle)
- || in_array(strtoupper($element['tag']),$this->polygonSingle))
+ if((in_array(mb_strtoupper($element['tag']),$this->pointSingle)
+ || in_array(mb_strtoupper($element['tag']),$this->lineSingle)
+ || in_array(mb_strtoupper($element['tag']),$this->polygonSingle))
&& $element['type'] == "close"){
$geom = false;
}
- if(strtoupper($element['tag']) == strtoupper("gml:featureMember") && $element['type'] == "close"){
+ if(mb_strtoupper($element['tag']) == mb_strtoupper("gml:featureMember") && $element['type'] == "close"){
$member = false;
$foundGeom = false;
$typeset=false;
@@ -200,7 +200,7 @@
// and sets the bbox according to these values
// if found it very useful for testing the png output, but now it may be obsolete
function parseBbox($gmlIndex, $gml){
- $data = str_replace("&", "&", $gml);
+ $data = preg_replace("&", "&", $gml);
$parser = xml_parser_create();
xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
@@ -221,16 +221,16 @@
$max_y = "";
foreach ($values as $element) {
- if(strtoupper($element['tag']) == strtoupper("gml:featureMember") && $element['type'] == "open"){
+ if(mb_strtoupper($element['tag']) == mb_strtoupper("gml:featureMember") && $element['type'] == "open"){
$cnt_member=true;
}
- if((in_array(strtoupper($element['tag']),$this->pointSingle)
- || in_array(strtoupper($element['tag']),$this->lineSingle)
- || in_array(strtoupper($element['tag']),$this->polygonSingle)) && $element['type'] == "open"){
+ if((in_array(mb_strtoupper($element['tag']),$this->pointSingle)
+ || in_array(mb_strtoupper($element['tag']),$this->lineSingle)
+ || in_array(mb_strtoupper($element['tag']),$this->polygonSingle)) && $element['type'] == "open"){
$boundingbox=true;
}
- if(strtoupper($element['tag']) == strtoupper("gml:coordinates") && $boundingbox == true){
+ if(mb_strtoupper($element['tag']) == mb_strtoupper("gml:coordinates") && $boundingbox == true){
$myGeom = $this->prepareCoordinates($element['value']);
$coord = explode(",",$myGeom);
for($i=0;$i<count($coord)-1; $i += 2){
@@ -249,12 +249,12 @@
}
}
- if((in_array(strtoupper($element['tag']),$this->pointSingle)
- || in_array(strtoupper($element['tag']),$this->lineSingle)
- || in_array(strtoupper($element['tag']),$this->polygonSingle)) && $element['type'] == "close"){
+ if((in_array(mb_strtoupper($element['tag']),$this->pointSingle)
+ || in_array(mb_strtoupper($element['tag']),$this->lineSingle)
+ || in_array(mb_strtoupper($element['tag']),$this->polygonSingle)) && $element['type'] == "close"){
$boundingbox = false;
}
- if(strtoupper($element['tag']) == strtoupper("gml:featureMember") && $element['type'] == "close"){
+ if(mb_strtoupper($element['tag']) == mb_strtoupper("gml:featureMember") && $element['type'] == "close"){
$cnt_member=false;
}
}
More information about the Mapbender_commits
mailing list