Commit 46d066765249f0d4c70d5a14aa252c80f3d58249
1 parent
288ad233
Exists in
master
and in
7 other branches
Correção na geração de RSS
Showing
3 changed files
with
23 additions
and
18 deletions
Show diff stats
admin/menu.html
| ... | ... | @@ -292,16 +292,6 @@ |
| 292 | 292 | |
| 293 | 293 | } |
| 294 | 294 | ]},{ |
| 295 | - html: "Configuração dos serviços OGC", | |
| 296 | - type: "html", | |
| 297 | - children:[ | |
| 298 | - { | |
| 299 | - html: "<a href='html/ogcws.html' target='principal'>Edição</a>", | |
| 300 | - type: "html", | |
| 301 | - enableHighlight: false, | |
| 302 | - | |
| 303 | - } | |
| 304 | - ]},{ | |
| 305 | 295 | html: "Outras opções", |
| 306 | 296 | type: "html", |
| 307 | 297 | children:[ | ... | ... |
admin/php/xml.php
| ... | ... | @@ -491,7 +491,7 @@ function geraXmlRSS($locaplic,$sql,$descricao) |
| 491 | 491 | $xml .= "<rss version='2.0'>"; |
| 492 | 492 | $xml .= "<channel>\n"; |
| 493 | 493 | $xml .= "<title>RSS</title>\n"; |
| 494 | - $xml .= "<description>$descricao</description>\n"; | |
| 494 | + $xml .= "<description>".str_replace("&","&",$descricao)."</description>\n"; | |
| 495 | 495 | $xml .= "<link></link>\n"; |
| 496 | 496 | $xml .= "<docs></docs>\n"; |
| 497 | 497 | $xml .= "<copyright>Gerado pelo i3Geo</copyright>\n"; |
| ... | ... | @@ -527,7 +527,7 @@ function geraXmlAtlas($locaplic,$editores) |
| 527 | 527 | error_reporting(0); |
| 528 | 528 | $dbh = ""; |
| 529 | 529 | include($locaplic."/admin/php/conexao.php"); |
| 530 | - | |
| 530 | + | |
| 531 | 531 | if($convUTF) |
| 532 | 532 | $xml = "<"."\x3F"."xml version='1.0' encoding='UTF-8' "."\x3F".">"; |
| 533 | 533 | else |
| ... | ... | @@ -914,7 +914,7 @@ function array_in_array($needle, $haystack) |
| 914 | 914 | } |
| 915 | 915 | function xmlTexto_prepara($texto) |
| 916 | 916 | { |
| 917 | - return str_replace("&","&",$texto); | |
| 917 | + return str_replace("&","&",$texto); | |
| 918 | 918 | } |
| 919 | 919 | function entity_decode($texto) |
| 920 | 920 | { | ... | ... |
classesphp/classe_mapa.php
| ... | ... | @@ -270,7 +270,8 @@ class Mapa |
| 270 | 270 | "colunaidunico", |
| 271 | 271 | "cortepixels", |
| 272 | 272 | "plugini3geo", |
| 273 | - "link_tema" | |
| 273 | + "link_tema", | |
| 274 | + "ferramentas" | |
| 274 | 275 | ); |
| 275 | 276 | foreach ($this->layers as $oLayer){ |
| 276 | 277 | $sel = "nao"; |
| ... | ... | @@ -430,6 +431,19 @@ class Mapa |
| 430 | 431 | if($link_tema == "" && $oLayer->getmetadata("link_tema") != ""){ |
| 431 | 432 | $link_tema = $oLayer->getmetadata("link_tema"); |
| 432 | 433 | } |
| 434 | + //TODO colocar aqui os parametros da linha do tempo??? | |
| 435 | + // | |
| 436 | + //parametros para ferramentas especiaifcas | |
| 437 | + // | |
| 438 | + $ferramentas = array(); | |
| 439 | + //mapa 3d | |
| 440 | + if($oLayer->getmetadata("tme") != ""){ | |
| 441 | + $f = $oLayer->getmetadata("tme"); | |
| 442 | + if (!mb_detect_encoding($f,"UTF-8",true)){ | |
| 443 | + $f = mb_convert_encoding($f,"UTF-8","ISO-8859-1"); | |
| 444 | + } | |
| 445 | + $ferramentas["tme"] = json_decode($f); | |
| 446 | + } | |
| 433 | 447 | //formatacao antiga, antes da versao 6.0 |
| 434 | 448 | /* |
| 435 | 449 | $temas[] = array( |
| ... | ... | @@ -516,7 +530,8 @@ class Mapa |
| 516 | 530 | $oLayer->getmetadata("COLUNAIDUNICO"), |
| 517 | 531 | $cortepixels, |
| 518 | 532 | $plugini3geo, |
| 519 | - $link_tema | |
| 533 | + $link_tema, | |
| 534 | + $ferramentas | |
| 520 | 535 | ); |
| 521 | 536 | } |
| 522 | 537 | } |
| ... | ... | @@ -1091,7 +1106,7 @@ class Mapa |
| 1091 | 1106 | //tem erro na versão 6 do Mapserver. Já abri um ticket no trac da OSGEO |
| 1092 | 1107 | $nlayer = criaLayer($this->mapa,MS_LAYER_LINE,MS_DEFAULT,"Grade de coordenadas","SIM"); |
| 1093 | 1108 | ms_newgridobj($nlayer); |
| 1094 | - | |
| 1109 | + | |
| 1095 | 1110 | $nlayer->grid->set("labelformat", "DDMMSS"); |
| 1096 | 1111 | $nlayer->grid->set("maxinterval", $intervalo); |
| 1097 | 1112 | $classe = $nlayer->getclass(0); |
| ... | ... | @@ -1117,7 +1132,7 @@ class Mapa |
| 1117 | 1132 | else{ |
| 1118 | 1133 | $label = $classe->label; |
| 1119 | 1134 | } |
| 1120 | - | |
| 1135 | + | |
| 1121 | 1136 | $label->set("size",$tamanhotexto); |
| 1122 | 1137 | $label->set("type",MS_BITMAP); |
| 1123 | 1138 | if ($fonte != "bitmap") { |
| ... | ... | @@ -1305,7 +1320,7 @@ class Mapa |
| 1305 | 1320 | $nNome = str_replace(".map","",basename($nomemap)); |
| 1306 | 1321 | $nlayer->setmetadata("arquivotemaoriginal",$nNome); |
| 1307 | 1322 | $nlayer->setmetadata("nomeoriginal",$nlayer->name); |
| 1308 | - | |
| 1323 | + | |
| 1309 | 1324 | $nlayer->set("name",$nomeunico[$n]); |
| 1310 | 1325 | //altera o nome do grupo se existir |
| 1311 | 1326 | if ($nlayer->group != " " && $nlayer->group != "" ){ | ... | ... |