Commit 2d97c1f47d5f451184ecadc158e7ff66053704be
1 parent
f738dc58
Exists in
master
and in
7 other branches
--no commit message
Showing
3 changed files
with
7 additions
and
4 deletions
Show diff stats
admin/php/classe_metaestat.php
... | ... | @@ -17,7 +17,7 @@ Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com |
17 | 17 | |
18 | 18 | Este programa é software livre; você pode redistribuí-lo |
19 | 19 | e/ou modificá-lo sob os termos da Licença Pública Geral |
20 | -GNU conforme publicada pela Free Software Foundation; | |
20 | +GNU conforme publicada pela listaDadosRegiao Software Foundation; | |
21 | 21 | |
22 | 22 | Este programa é distribuído na expectativa de que seja útil, |
23 | 23 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita |
... | ... | @@ -1510,7 +1510,10 @@ class Metaestat{ |
1510 | 1510 | $sql .= " order by ".$regiao["colunanomeregiao"]; |
1511 | 1511 | |
1512 | 1512 | $q = $dbh->query($sql,PDO::FETCH_ASSOC); |
1513 | - $r = $q->fetchAll(); | |
1513 | + $r = array(); | |
1514 | + if($q){ | |
1515 | + $r = $q->fetchAll(); | |
1516 | + } | |
1514 | 1517 | return $r; |
1515 | 1518 | } |
1516 | 1519 | function listaAgregaRegiao($codigo_tipo_regiao,$id_agregaregiao=""){ | ... | ... |
ferramentas/metaestat/locregiao.js
... | ... | @@ -95,7 +95,7 @@ i3GEOF.locregiao = { |
95 | 95 | }, |
96 | 96 | //utiliza o dicionario compartilhado |
97 | 97 | iniciaDicionario: function(){ |
98 | - if(typeof(i3GEOF.metaestat.dicionario) === 'undefined'){ | |
98 | + if(!i3GEOF.metaestat || typeof(i3GEOF.metaestat.dicionario) === 'undefined'){ | |
99 | 99 | i3GEO.util.scriptTag( |
100 | 100 | i3GEO.configura.locaplic+"/ferramentas/metaestat/dicionario.js", |
101 | 101 | "i3GEOF.locregiao.iniciaJanelaFlutuante()", | ... | ... |
ferramentas/metaestat/mostraregiao.js
... | ... | @@ -72,7 +72,7 @@ i3GEOF.mostraregiao = { |
72 | 72 | }, |
73 | 73 | //utiliza o dicionario compartilhado |
74 | 74 | iniciaDicionario: function(){ |
75 | - if(typeof(i3GEOF.metaestat.dicionario) === 'undefined'){ | |
75 | + if(!i3GEOF.metaestat || typeof(i3GEOF.metaestat.dicionario) === 'undefined'){ | |
76 | 76 | i3GEO.util.scriptTag( |
77 | 77 | i3GEO.configura.locaplic+"/ferramentas/metaestat/dicionario.js", |
78 | 78 | "i3GEOF.mostraregiao.iniciaJanelaFlutuante()", | ... | ... |