Commit fbc10ce9bc7294528c2f3b4c169af93fec8f96e5
1 parent
be97c4e2
Exists in
master
and in
7 other branches
correção ao salvar mapfile diretamente da árvore de camadas para remover metadad…
…os não necessários (apenas para editores)
Showing
2 changed files
with
12 additions
and
1 deletions
Show diff stats
admin/html/editormapfile.html
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <html> | 2 | <html> |
| 3 | <head> | 3 | <head> |
| 4 | <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> | 4 | <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> |
| 5 | - <title>Menus</title> | 5 | + <title>Editor de Mapfile</title> |
| 6 | <style type="text/css"> | 6 | <style type="text/css"> |
| 7 | /*margin and padding on body element | 7 | /*margin and padding on body element |
| 8 | can introduce errors in determining | 8 | can introduce errors in determining |
admin/php/editormapfile.php
| @@ -992,6 +992,17 @@ function refazerLayer() | @@ -992,6 +992,17 @@ function refazerLayer() | ||
| 992 | $layeroriginal->set("status",MS_DELETE); | 992 | $layeroriginal->set("status",MS_DELETE); |
| 993 | $nl = ms_newLayerObj($mapatema,$layernovo); | 993 | $nl = ms_newLayerObj($mapatema,$layernovo); |
| 994 | $nl->set("name",$codigomap); | 994 | $nl->set("name",$codigomap); |
| 995 | + $nl->setmetadata("nomeoriginal",""); | ||
| 996 | + $nl->setmetadata("cache",""); | ||
| 997 | + $numclasses = $nl->numclasses; | ||
| 998 | + if ($numclasses > 0) | ||
| 999 | + { | ||
| 1000 | + for ($i=0; $i < $numclasses; $i++) | ||
| 1001 | + { | ||
| 1002 | + $classe = $nl->getClass($i); | ||
| 1003 | + $classe->set("title",""); | ||
| 1004 | + } | ||
| 1005 | + } | ||
| 995 | $mapatema->save($arqtema); | 1006 | $mapatema->save($arqtema); |
| 996 | removeCabecalho($arqtema); | 1007 | removeCabecalho($arqtema); |
| 997 | return array("data"=>"ok"); | 1008 | return array("data"=>"ok"); |