Commit a7320b170a1f2793ecf06925be63bdea4587cbbf
1 parent
41877b0b
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
7 additions
and
5 deletions
Show diff stats
testamapfile.php
| @@ -67,6 +67,8 @@ if (!function_exists('ms_GetVersion')) | @@ -67,6 +67,8 @@ if (!function_exists('ms_GetVersion')) | ||
| 67 | else | 67 | else |
| 68 | {dl('php_mapscript.so');} | 68 | {dl('php_mapscript.so');} |
| 69 | } | 69 | } |
| 70 | +$versao = versao(); | ||
| 71 | +$versao = $versao["principal"]; | ||
| 70 | ms_ResetErrorList(); | 72 | ms_ResetErrorList(); |
| 71 | if(!isset($tipo)) | 73 | if(!isset($tipo)) |
| 72 | {$tipo = "";} | 74 | {$tipo = "";} |
| @@ -107,7 +109,7 @@ if (isset($map) && $map != "") | @@ -107,7 +109,7 @@ if (isset($map) && $map != "") | ||
| 107 | } | 109 | } |
| 108 | function verifica($map,$solegenda) | 110 | function verifica($map,$solegenda) |
| 109 | { | 111 | { |
| 110 | - global $tipo,$locaplic,$postgis_mapa; | 112 | + global $tipo,$locaplic,$postgis_mapa,$versao; |
| 111 | if ($tipo == "mini" && file_exists('temas/miniaturas/'.$map.".mini.png")) | 113 | if ($tipo == "mini" && file_exists('temas/miniaturas/'.$map.".mini.png")) |
| 112 | { | 114 | { |
| 113 | Header("Content-type: image/png"); | 115 | Header("Content-type: image/png"); |
| @@ -140,14 +142,14 @@ function verifica($map,$solegenda) | @@ -140,14 +142,14 @@ function verifica($map,$solegenda) | ||
| 140 | if ($tema != "") | 142 | if ($tema != "") |
| 141 | { | 143 | { |
| 142 | if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) | 144 | if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) |
| 143 | - {$mapa = ms_newMapObj("aplicmap/geral1windows.map");} | 145 | + {$mapa = ms_newMapObj("aplicmap/geral1windowsv".$versao.".map");} |
| 144 | else | 146 | else |
| 145 | { | 147 | { |
| 146 | - if(file_exists('/var/www/i3geo/aplicmap/geral1debian.map')){ | ||
| 147 | - $mapa = ms_newMapObj("aplicmap/geral1debian.map"); | 148 | + if(file_exists('/var/www/i3geo/aplicmap/geral1debianv'.$versao.'.map')){ |
| 149 | + $mapa = ms_newMapObj("aplicmap/geral1debianv".$versao.".map"); | ||
| 148 | } | 150 | } |
| 149 | else | 151 | else |
| 150 | - {$mapa = ms_newMapObj("aplicmap/geral1.map");} | 152 | + {$mapa = ms_newMapObj("aplicmap/geral1v".$versao.".map");} |
| 151 | } | 153 | } |
| 152 | if(@ms_newMapObj($tema)) | 154 | if(@ms_newMapObj($tema)) |
| 153 | { | 155 | { |