Commit 46d066765249f0d4c70d5a14aa252c80f3d58249

Authored by Edmar Moretti
1 parent 288ad233

Correção na geração de RSS

admin/menu.html
@@ -292,16 +292,6 @@ @@ -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&ccedil;&atilde;o</a>",  
300 - type: "html",  
301 - enableHighlight: false,  
302 -  
303 - }  
304 - ]},{  
305 html: "Outras op&ccedil;&otilde;es", 295 html: "Outras op&ccedil;&otilde;es",
306 type: "html", 296 type: "html",
307 children:[ 297 children:[
admin/php/xml.php
@@ -491,7 +491,7 @@ function geraXmlRSS($locaplic,$sql,$descricao) @@ -491,7 +491,7 @@ function geraXmlRSS($locaplic,$sql,$descricao)
491 $xml .= "<rss version='2.0'>"; 491 $xml .= "<rss version='2.0'>";
492 $xml .= "<channel>\n"; 492 $xml .= "<channel>\n";
493 $xml .= "<title>RSS</title>\n"; 493 $xml .= "<title>RSS</title>\n";
494 - $xml .= "<description>$descricao</description>\n"; 494 + $xml .= "<description>".str_replace("&","&amp;",$descricao)."</description>\n";
495 $xml .= "<link></link>\n"; 495 $xml .= "<link></link>\n";
496 $xml .= "<docs></docs>\n"; 496 $xml .= "<docs></docs>\n";
497 $xml .= "<copyright>Gerado pelo i3Geo</copyright>\n"; 497 $xml .= "<copyright>Gerado pelo i3Geo</copyright>\n";
@@ -527,7 +527,7 @@ function geraXmlAtlas($locaplic,$editores) @@ -527,7 +527,7 @@ function geraXmlAtlas($locaplic,$editores)
527 error_reporting(0); 527 error_reporting(0);
528 $dbh = ""; 528 $dbh = "";
529 include($locaplic."/admin/php/conexao.php"); 529 include($locaplic."/admin/php/conexao.php");
530 - 530 +
531 if($convUTF) 531 if($convUTF)
532 $xml = "<"."\x3F"."xml version='1.0' encoding='UTF-8' "."\x3F".">"; 532 $xml = "<"."\x3F"."xml version='1.0' encoding='UTF-8' "."\x3F".">";
533 else 533 else
@@ -914,7 +914,7 @@ function array_in_array($needle, $haystack) @@ -914,7 +914,7 @@ function array_in_array($needle, $haystack)
914 } 914 }
915 function xmlTexto_prepara($texto) 915 function xmlTexto_prepara($texto)
916 { 916 {
917 - return str_replace("&","&",$texto); 917 + return str_replace("&","&amp;",$texto);
918 } 918 }
919 function entity_decode($texto) 919 function entity_decode($texto)
920 { 920 {
classesphp/classe_mapa.php
@@ -270,7 +270,8 @@ class Mapa @@ -270,7 +270,8 @@ class Mapa
270 "colunaidunico", 270 "colunaidunico",
271 "cortepixels", 271 "cortepixels",
272 "plugini3geo", 272 "plugini3geo",
273 - "link_tema" 273 + "link_tema",
  274 + "ferramentas"
274 ); 275 );
275 foreach ($this->layers as $oLayer){ 276 foreach ($this->layers as $oLayer){
276 $sel = "nao"; 277 $sel = "nao";
@@ -430,6 +431,19 @@ class Mapa @@ -430,6 +431,19 @@ class Mapa
430 if($link_tema == "" && $oLayer->getmetadata("link_tema") != ""){ 431 if($link_tema == "" && $oLayer->getmetadata("link_tema") != ""){
431 $link_tema = $oLayer->getmetadata("link_tema"); 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 //formatacao antiga, antes da versao 6.0 447 //formatacao antiga, antes da versao 6.0
434 /* 448 /*
435 $temas[] = array( 449 $temas[] = array(
@@ -516,7 +530,8 @@ class Mapa @@ -516,7 +530,8 @@ class Mapa
516 $oLayer->getmetadata("COLUNAIDUNICO"), 530 $oLayer->getmetadata("COLUNAIDUNICO"),
517 $cortepixels, 531 $cortepixels,
518 $plugini3geo, 532 $plugini3geo,
519 - $link_tema 533 + $link_tema,
  534 + $ferramentas
520 ); 535 );
521 } 536 }
522 } 537 }
@@ -1091,7 +1106,7 @@ class Mapa @@ -1091,7 +1106,7 @@ class Mapa
1091 //tem erro na vers&atilde;o 6 do Mapserver. J&aacute; abri um ticket no trac da OSGEO 1106 //tem erro na vers&atilde;o 6 do Mapserver. J&aacute; abri um ticket no trac da OSGEO
1092 $nlayer = criaLayer($this->mapa,MS_LAYER_LINE,MS_DEFAULT,"Grade de coordenadas","SIM"); 1107 $nlayer = criaLayer($this->mapa,MS_LAYER_LINE,MS_DEFAULT,"Grade de coordenadas","SIM");
1093 ms_newgridobj($nlayer); 1108 ms_newgridobj($nlayer);
1094 - 1109 +
1095 $nlayer->grid->set("labelformat", "DDMMSS"); 1110 $nlayer->grid->set("labelformat", "DDMMSS");
1096 $nlayer->grid->set("maxinterval", $intervalo); 1111 $nlayer->grid->set("maxinterval", $intervalo);
1097 $classe = $nlayer->getclass(0); 1112 $classe = $nlayer->getclass(0);
@@ -1117,7 +1132,7 @@ class Mapa @@ -1117,7 +1132,7 @@ class Mapa
1117 else{ 1132 else{
1118 $label = $classe->label; 1133 $label = $classe->label;
1119 } 1134 }
1120 - 1135 +
1121 $label->set("size",$tamanhotexto); 1136 $label->set("size",$tamanhotexto);
1122 $label->set("type",MS_BITMAP); 1137 $label->set("type",MS_BITMAP);
1123 if ($fonte != "bitmap") { 1138 if ($fonte != "bitmap") {
@@ -1305,7 +1320,7 @@ class Mapa @@ -1305,7 +1320,7 @@ class Mapa
1305 $nNome = str_replace(".map","",basename($nomemap)); 1320 $nNome = str_replace(".map","",basename($nomemap));
1306 $nlayer->setmetadata("arquivotemaoriginal",$nNome); 1321 $nlayer->setmetadata("arquivotemaoriginal",$nNome);
1307 $nlayer->setmetadata("nomeoriginal",$nlayer->name); 1322 $nlayer->setmetadata("nomeoriginal",$nlayer->name);
1308 - 1323 +
1309 $nlayer->set("name",$nomeunico[$n]); 1324 $nlayer->set("name",$nomeunico[$n]);
1310 //altera o nome do grupo se existir 1325 //altera o nome do grupo se existir
1311 if ($nlayer->group != " " && $nlayer->group != "" ){ 1326 if ($nlayer->group != " " && $nlayer->group != "" ){