Commit 1e041186be2a39921831fe198ccd6dbbffacde6b
1 parent
04e3336c
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
22 additions
and
22 deletions
Show diff stats
pacotes/kmlmapserver/classes/layerserver.class.php
| ... | ... | @@ -579,28 +579,28 @@ class LayerServer { |
| 579 | 579 | //var_dump($attributes);exit; |
| 580 | 580 | //if($description_template != ""){return $description_template;} |
| 581 | 581 | $n = ""; |
| 582 | - if($itens == "") | |
| 583 | - { | |
| 584 | - foreach($attributes as $k => $val){ | |
| 585 | - $n .= $k." - ".$attributes[$k]."\n"; | |
| 586 | - } | |
| 587 | - } | |
| 588 | - else | |
| 589 | - { | |
| 590 | - $itens = explode(",",$itens); | |
| 591 | - $itensdesc = explode(",",$itensdesc); | |
| 592 | - if($description_template != "") | |
| 593 | - { | |
| 594 | - for($i=0;$i<count($itens);$i++) | |
| 595 | - {$description_template = str_replace("%".$itens[$i]."%",$attributes[$itens[$i]],$description_template);} | |
| 596 | - $n = $description_template; | |
| 597 | - } | |
| 598 | - else | |
| 599 | - { | |
| 600 | - for($i=0;$i<count($itens);$i++) | |
| 601 | - {$n .= $itensdesc[$i]." - ".$attributes[$itens[$i]]."\n";} | |
| 602 | - } | |
| 603 | - } | |
| 582 | + if($description_template != "") | |
| 583 | + { | |
| 584 | + foreach($attributes as $k => $val) | |
| 585 | + {$description_template = str_replace("%".$k."%",$attributes[$k],$description_template);} | |
| 586 | + $n = $description_template; | |
| 587 | + } | |
| 588 | + else | |
| 589 | + { | |
| 590 | + if($itens == "") | |
| 591 | + { | |
| 592 | + foreach($attributes as $k => $val){ | |
| 593 | + $n .= $k." - ".$attributes[$k]."\n"; | |
| 594 | + } | |
| 595 | + } | |
| 596 | + else | |
| 597 | + { | |
| 598 | + $itens = explode(",",$itens); | |
| 599 | + $itensdesc = explode(",",$itensdesc); | |
| 600 | + for($i=0;$i<count($itens);$i++) | |
| 601 | + {$n .= $itensdesc[$i]." - ".$attributes[$itens[$i]]."\n";} | |
| 602 | + } | |
| 603 | + } | |
| 604 | 604 | $description = mb_convert_encoding($n,"UTF-8",mb_detect_encoding($n,"UTF-8,ISO-8859-1")); |
| 605 | 605 | return $description; |
| 606 | 606 | } | ... | ... |