Commit b665a43e81a8cee0494278c54418a87062f23e32
1 parent
cc7e80f0
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
16 additions
and
4 deletions
Show diff stats
classesphp/classe_mapa.php
@@ -981,16 +981,28 @@ $adicionar - sim|nao força a adição de um tema se ele não existir no mapfile atu | @@ -981,16 +981,28 @@ $adicionar - sim|nao força a adição de um tema se ele não existir no mapfile atu | ||
981 | { | 981 | { |
982 | $teste = explode(",",$ligar); | 982 | $teste = explode(",",$ligar); |
983 | $adicionar = array(); | 983 | $adicionar = array(); |
984 | - $incluir = false; | ||
985 | foreach($teste as $t) | 984 | foreach($teste as $t) |
986 | { | 985 | { |
987 | $incluir = false; | 986 | $incluir = false; |
988 | foreach($this->layers as $layerE) | 987 | foreach($this->layers as $layerE) |
989 | { | 988 | { |
990 | - if($layerE->name != $t && $layerE->getmetadata("nomeoriginal") != $t) | ||
991 | - $incluir = true; | 989 | + $original = $layerE->getmetadata("nomeoriginal"); |
990 | + if($original != "") | ||
991 | + { | ||
992 | + if($original != $t) | ||
993 | + {$incluir = true;} | ||
994 | + else | ||
995 | + {$incluir = false;} | ||
996 | + } | ||
997 | + else | ||
998 | + { | ||
999 | + if($layerE->name != $t) | ||
1000 | + {$incluir = true;} | ||
1001 | + else | ||
1002 | + {$incluir = false;} | ||
1003 | + } | ||
992 | } | 1004 | } |
993 | - if($incluir){$adicionar[] = $t;} | 1005 | + if($incluir == true){$adicionar[] = $t;} |
994 | } | 1006 | } |
995 | if(count($adicionar > 0)) | 1007 | if(count($adicionar > 0)) |
996 | { | 1008 | { |