Commit e9717405d7d3e0d6fb4efb71d1c2abe9782731c5
1 parent
5142c0dd
Exists in
master
and in
7 other branches
Correção no encoding da função que altera o nome da camada
Showing
1 changed file
with
7 additions
and
4 deletions
Show diff stats
classesphp/classe_temas.php
| @@ -668,12 +668,15 @@ $valor - Novo nome. | @@ -668,12 +668,15 @@ $valor - Novo nome. | ||
| 668 | $valor = str_replace("|",";",$valor); | 668 | $valor = str_replace("|",";",$valor); |
| 669 | $valor = html_entity_decode($valor); | 669 | $valor = html_entity_decode($valor); |
| 670 | 670 | ||
| 671 | - foreach ($this->grupo as $lg) | ||
| 672 | - { | 671 | + foreach ($this->grupo as $lg){ |
| 673 | $ll = $this->mapa->getlayerbyname($lg); | 672 | $ll = $this->mapa->getlayerbyname($lg); |
| 674 | $meta = $ll->getmetadata("tema"); | 673 | $meta = $ll->getmetadata("tema"); |
| 675 | - if (($meta != "") && ($meta != "NAO")) | ||
| 676 | - {$ll->setmetadata("tema",$valor);} | 674 | + if (($meta != "") && ($meta != "NAO")){ |
| 675 | + if (mb_detect_encoding ( $valor, 'UTF-8, ISO-8859-1' ) == "UTF-8") { | ||
| 676 | + $valor = utf8_decode ( $valor ); | ||
| 677 | + } | ||
| 678 | + $ll->setmetadata("tema",$valor); | ||
| 679 | + } | ||
| 677 | } | 680 | } |
| 678 | return ("ok"); | 681 | return ("ok"); |
| 679 | } | 682 | } |