Commit b199bded64a784c2de2b2db8114c7c5c789a9fca
1 parent
3b8c55ff
Exists in
master
and in
7 other branches
--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,7 +224,7 @@ if(isset($_GET["tms"])){ | ||
| 224 | $lat2 = ($y+1) / $n * 180.0 - 90.0; | 224 | $lat2 = ($y+1) / $n * 180.0 - 90.0; |
| 225 | //essa funcao termina o processo se a imagem existir | 225 | //essa funcao termina o processo se a imagem existir |
| 226 | if($cache == true){ | 226 | if($cache == true){ |
| 227 | - carregaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"]); | 227 | + carregaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"],$_GET["plugin"],$_GET["tema"]); |
| 228 | } | 228 | } |
| 229 | $layer0 = $oMap->getlayer(0); | 229 | $layer0 = $oMap->getlayer(0); |
| 230 | // | 230 | // |
| @@ -259,7 +259,7 @@ if(isset($_GET["tms"])){ | @@ -259,7 +259,7 @@ if(isset($_GET["tms"])){ | ||
| 259 | exit; | 259 | exit; |
| 260 | } | 260 | } |
| 261 | if($cache == true){ | 261 | if($cache == true){ |
| 262 | - salvaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"]); | 262 | + salvaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"],$_GET["plugin"],$_GET["tema"]); |
| 263 | } | 263 | } |
| 264 | renderNocacheTms(); | 264 | renderNocacheTms(); |
| 265 | } | 265 | } |
| @@ -469,8 +469,11 @@ function renderNocacheTms(){ | @@ -469,8 +469,11 @@ function renderNocacheTms(){ | ||
| 469 | header("Content-type: image/png"); | 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 | global $dir_tmp; | 473 | global $dir_tmp; |
| 474 | + if(!empty($plugin)){ | ||
| 475 | + $tms = str_replace($tema,$tema.md5($plugin),$tms); | ||
| 476 | + } | ||
| 474 | if($cachedir == ""){ | 477 | if($cachedir == ""){ |
| 475 | $nome = $dir_tmp."/cache".$tms; | 478 | $nome = $dir_tmp."/cache".$tms; |
| 476 | } | 479 | } |
| @@ -489,8 +492,11 @@ function carregaCacheImagem($cachedir,$map,$tms){ | @@ -489,8 +492,11 @@ function carregaCacheImagem($cachedir,$map,$tms){ | ||
| 489 | exit; | 492 | exit; |
| 490 | } | 493 | } |
| 491 | } | 494 | } |
| 492 | -function salvaCacheImagem($cachedir,$map,$tms){ | 495 | +function salvaCacheImagem($cachedir,$map,$tms, $plugin, $tema){ |
| 493 | global $img,$dir_tmp,$cortePixels; | 496 | global $img,$dir_tmp,$cortePixels; |
| 497 | + if(!empty($plugin)){ | ||
| 498 | + $tms = str_replace($tema,$tema.md5($plugin),$tms); | ||
| 499 | + } | ||
| 494 | if($cachedir == ""){ | 500 | if($cachedir == ""){ |
| 495 | $nome = $dir_tmp."/cache".$tms; | 501 | $nome = $dir_tmp."/cache".$tms; |
| 496 | } | 502 | } |