Commit 1e4582d9b21ea86f170a5eca82c7d0149fb8eabd
1 parent
8dadebf9
Exists in
master
Compatibilização da abertura de mapas salvos anteriormente com os nomes das novas interfaces
Showing
3 changed files
with
5 additions
and
11 deletions
Show diff stats
classesphp/funcoes_gerais.php
| @@ -3077,6 +3077,7 @@ function restauraMapaAdmin($id_mapa, $dir_tmp) | @@ -3077,6 +3077,7 @@ function restauraMapaAdmin($id_mapa, $dir_tmp) | ||
| 3077 | $dbh = null; | 3077 | $dbh = null; |
| 3078 | $dbhw = null; | 3078 | $dbhw = null; |
| 3079 | $mapasalvo = $mapasalvo[0]; | 3079 | $mapasalvo = $mapasalvo[0]; |
| 3080 | + //var_dump($mapasalvo);exit; | ||
| 3080 | $base = ""; | 3081 | $base = ""; |
| 3081 | if (! isset($mapasalvo["publicado"])) { | 3082 | if (! isset($mapasalvo["publicado"])) { |
| 3082 | $mapasalvo["publicado"] = ""; | 3083 | $mapasalvo["publicado"] = ""; |
mapas/templates/templatelista.php
| @@ -4,14 +4,6 @@ | @@ -4,14 +4,6 @@ | ||
| 4 | <h4 class="list-group-item-heading"> | 4 | <h4 class="list-group-item-heading"> |
| 5 | <div class="hidden-xs"> | 5 | <div class="hidden-xs"> |
| 6 | <span class="pull-right"> </span> | 6 | <span class="pull-right"> </span> |
| 7 | - <a title="{{{outrosLinks}}}" onclick="mostraLinks('detalhe_{{ID_MAPA}}')" href="javascript:void(0)" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | ||
| 8 | - <i class="material-icons md-18">more_horiz</i> | ||
| 9 | - </a> | ||
| 10 | - <span class="pull-right"> </span> | ||
| 11 | - <a title="{{{linkDefault}}}" href="{{{LINK}}}" target="_blank" class="btn btn-danger btn-fab btn-fab-mini pull-right" role="button"> | ||
| 12 | - <i class="material-icons md-18">launch</i> | ||
| 13 | - </a> | ||
| 14 | - <span class="pull-right"> </span> | ||
| 15 | <a title="link" role="button" href="javascript:void(0)" data-toggle="quadroQrcode" data-url="{{{LINK}}}" class="btn btn-danger btn-fab btn-fab-mini pull-right"> | 7 | <a title="link" role="button" href="javascript:void(0)" data-toggle="quadroQrcode" data-url="{{{LINK}}}" class="btn btn-danger btn-fab btn-fab-mini pull-right"> |
| 16 | <span class="glyphicon glyphicon-qrcode" aria-hidden="true"></span> | 8 | <span class="glyphicon glyphicon-qrcode" aria-hidden="true"></span> |
| 17 | </a> | 9 | </a> |
ms_criamapa.php
| @@ -354,7 +354,6 @@ if (! isset($mapext) || empty($mapext)) { | @@ -354,7 +354,6 @@ if (! isset($mapext) || empty($mapext)) { | ||
| 354 | $mapext = ""; | 354 | $mapext = ""; |
| 355 | } else { | 355 | } else { |
| 356 | $mapext = str_replace(",", " ", $mapext); | 356 | $mapext = str_replace(",", " ", $mapext); |
| 357 | - | ||
| 358 | } | 357 | } |
| 359 | $saikuUrl_ = $saikuUrl; | 358 | $saikuUrl_ = $saikuUrl; |
| 360 | $cachedir_ = $cachedir; | 359 | $cachedir_ = $cachedir; |
| @@ -533,7 +532,6 @@ if (file_exists($base)) { | @@ -533,7 +532,6 @@ if (file_exists($base)) { | ||
| 533 | $map = ms_newMapObj($locaplic . "/aplicmap/" . $base . ".map"); | 532 | $map = ms_newMapObj($locaplic . "/aplicmap/" . $base . ".map"); |
| 534 | $mapn = ms_newMapObj($locaplic . "/aplicmap/" . $base . ".map"); | 533 | $mapn = ms_newMapObj($locaplic . "/aplicmap/" . $base . ".map"); |
| 535 | } | 534 | } |
| 536 | - | ||
| 537 | /* | 535 | /* |
| 538 | * Parâmetros adicionais. | 536 | * Parâmetros adicionais. |
| 539 | * | 537 | * |
| @@ -653,7 +651,6 @@ if (isset($url_wms)) { | @@ -653,7 +651,6 @@ if (isset($url_wms)) { | ||
| 653 | } | 651 | } |
| 654 | 652 | ||
| 655 | adaptaLayers($tmpfname, $versao); | 653 | adaptaLayers($tmpfname, $versao); |
| 656 | - | ||
| 657 | if ($interface != "mashup") { | 654 | if ($interface != "mashup") { |
| 658 | abreInterface($interface, $caminho); | 655 | abreInterface($interface, $caminho); |
| 659 | } | 656 | } |
| @@ -729,11 +726,15 @@ function abreInterface($interface, $caminho) | @@ -729,11 +726,15 @@ function abreInterface($interface, $caminho) | ||
| 729 | } | 726 | } |
| 730 | exit(); | 727 | exit(); |
| 731 | } else { | 728 | } else { |
| 729 | + //para efeitos de compatibilidade | ||
| 730 | + $interface = str_replace("ol.htm","ol.php",$interface); | ||
| 731 | + $interface = str_replace("osm.htm","osm.php",$interface); | ||
| 732 | if (file_exists($caminho . $customDir . "/" . $interface)) { | 732 | if (file_exists($caminho . $customDir . "/" . $interface)) { |
| 733 | $urln = $caminho . $customDir . "/" . $interface . "?&" . session_id(); | 733 | $urln = $caminho . $customDir . "/" . $interface . "?&" . session_id(); |
| 734 | } else { | 734 | } else { |
| 735 | $urln = $interface . "?&" . session_id(); | 735 | $urln = $interface . "?&" . session_id(); |
| 736 | } | 736 | } |
| 737 | + //echo $urln;exit; | ||
| 737 | if (! headers_sent()) { | 738 | if (! headers_sent()) { |
| 738 | header("Location:" . $urln); | 739 | header("Location:" . $urln); |
| 739 | } else { | 740 | } else { |