Commit 88e3b07fa76c72f8b558ac68128d4d775b8dc6b2

Authored by Edmar Moretti
1 parent 86974dbb

Inclusão das opções de definição de tema editável no novo sistema de administração

Showing 1 changed file with 7 additions and 21 deletions   Show diff stats
admin1/catalogo/mapfile/editavel/exec.php
@@ -51,7 +51,7 @@ switch ($funcao) { @@ -51,7 +51,7 @@ switch ($funcao) {
51 header ( "HTTP/1.1 400 arquivo nao existe" ); 51 header ( "HTTP/1.1 400 arquivo nao existe" );
52 exit (); 52 exit ();
53 } 53 }
54 - $novo = catalogo/mapfile/editavel/alterar ( $locaplic, $id_tema, $codigo, $_POST["cache"], $_POST["tiles"], $_POST["maxfeatures"]); 54 + $novo = catalogo/mapfile/editavel/alterar ( $locaplic, $id_tema, $codigo, $_POST["editavel"], $_POST["esquematabelaeditavel"], $_POST["tabelaeditavel"], $_POST["colunaidunico"], $_POST["colunageometria"] );
55 if ($novo === false) { 55 if ($novo === false) {
56 header ( "HTTP/1.1 500 erro ao definir as propriedades" ); 56 header ( "HTTP/1.1 500 erro ao definir as propriedades" );
57 exit (); 57 exit ();
@@ -135,17 +135,6 @@ outros @@ -135,17 +135,6 @@ outros
135 $dados["palletestep"] = $layer->getmetadata("palletestep"); 135 $dados["palletestep"] = $layer->getmetadata("palletestep");
136 $dados["description_template"] = $layer->getmetadata("description_template"); 136 $dados["description_template"] = $layer->getmetadata("description_template");
137 $dados["editorsql"] = $layer->getmetadata("editorsql"); 137 $dados["editorsql"] = $layer->getmetadata("editorsql");
138 -  
139 -  
140 -  
141 -  
142 -  
143 -  
144 -  
145 -  
146 -  
147 -  
148 -  
149 */ 138 */
150 retornaJSON ( array ( 139 retornaJSON ( array (
151 "dados" => $dados 140 "dados" => $dados
@@ -153,7 +142,7 @@ outros @@ -153,7 +142,7 @@ outros
153 break; 142 break;
154 } 143 }
155 cpjson ( $retorno ); 144 cpjson ( $retorno );
156 -function alterar($locaplic, $id_tema, $codigo, $cache, $tiles, $maxfeatures) { 145 +function alterar($locaplic, $id_tema, $codigo, $editavel, $esquematabelaeditavel, $tabelaeditavel, $colunaidunico, $colunageometria) {
157 $arq = $locaplic . "/temas/" . $codigo . ".map"; 146 $arq = $locaplic . "/temas/" . $codigo . ".map";
158 if (! file_exists ( $locaplic . "/temas/" . $codigo . ".map" )) { 147 if (! file_exists ( $locaplic . "/temas/" . $codigo . ".map" )) {
159 return false; 148 return false;
@@ -163,13 +152,11 @@ function alterar($locaplic, $id_tema, $codigo, $cache, $tiles, $maxfeatures) { @@ -163,13 +152,11 @@ function alterar($locaplic, $id_tema, $codigo, $cache, $tiles, $maxfeatures) {
163 if ($layer == "") { 152 if ($layer == "") {
164 return false; 153 return false;
165 } 154 }
166 - $layer->setmetadata ( "cache", $cache );  
167 - $layer->setmetadata ( "cache", $tiles );  
168 - if(empty($maxfeatures)){  
169 - $maxfeatures = -1;  
170 - }  
171 - $layer->set("maxfeatures",$maxfeatures);  
172 - 155 + $layer->setmetadata ( "editavel", $editavel );
  156 + $layer->setmetadata ( "esquematabelaeditavel", $esquematabelaeditavel );
  157 + $layer->setmetadata ( "tabelaeditavel", $tabelaeditavel );
  158 + $layer->setmetadata ( "colunaidunico", $colunaidunico );
  159 + $layer->setmetadata ( "colunageometria", $colunageometria );
173 try { 160 try {
174 $mapa->save ( $arq ); 161 $mapa->save ( $arq );
175 include (dirname ( __FILE__ ) . "/../../../php/removeCabecalhoMapfile.php"); 162 include (dirname ( __FILE__ ) . "/../../../php/removeCabecalhoMapfile.php");
@@ -179,5 +166,4 @@ function alterar($locaplic, $id_tema, $codigo, $cache, $tiles, $maxfeatures) { @@ -179,5 +166,4 @@ function alterar($locaplic, $id_tema, $codigo, $cache, $tiles, $maxfeatures) {
179 return false; 166 return false;
180 } 167 }
181 } 168 }
182 -  
183 ?> 169 ?>