Commit b199bded64a784c2de2b2db8114c7c5c789a9fca

Authored by Edmar Moretti
1 parent 3b8c55ff

--no commit message

Showing 1 changed file with 10 additions and 4 deletions   Show diff stats
ferramentas/parametrossql/ogc.php
... ... @@ -224,7 +224,7 @@ if(isset($_GET["tms"])){
224 224 $lat2 = ($y+1) / $n * 180.0 - 90.0;
225 225 //essa funcao termina o processo se a imagem existir
226 226 if($cache == true){
227   - carregaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"]);
  227 + carregaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"],$_GET["plugin"],$_GET["tema"]);
228 228 }
229 229 $layer0 = $oMap->getlayer(0);
230 230 //
... ... @@ -259,7 +259,7 @@ if(isset($_GET["tms"])){
259 259 exit;
260 260 }
261 261 if($cache == true){
262   - salvaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"]);
  262 + salvaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"],$_GET["plugin"],$_GET["tema"]);
263 263 }
264 264 renderNocacheTms();
265 265 }
... ... @@ -469,8 +469,11 @@ function renderNocacheTms(){
469 469 header("Content-type: image/png");
470 470 }
471 471 }
472   -function carregaCacheImagem($cachedir,$map,$tms){
  472 +function carregaCacheImagem($cachedir,$map,$tms, $plugin, $tema){
473 473 global $dir_tmp;
  474 + if(!empty($plugin)){
  475 + $tms = str_replace($tema,$tema.md5($plugin),$tms);
  476 + }
474 477 if($cachedir == ""){
475 478 $nome = $dir_tmp."/cache".$tms;
476 479 }
... ... @@ -489,8 +492,11 @@ function carregaCacheImagem($cachedir,$map,$tms){
489 492 exit;
490 493 }
491 494 }
492   -function salvaCacheImagem($cachedir,$map,$tms){
  495 +function salvaCacheImagem($cachedir,$map,$tms, $plugin, $tema){
493 496 global $img,$dir_tmp,$cortePixels;
  497 + if(!empty($plugin)){
  498 + $tms = str_replace($tema,$tema.md5($plugin),$tms);
  499 + }
494 500 if($cachedir == ""){
495 501 $nome = $dir_tmp."/cache".$tms;
496 502 }
... ...