Commit cad29d80ba8cc2bef373de8463996c5dd5053ea6
1 parent
710974a1
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
10 additions
and
20 deletions
Show diff stats
classesphp/atlas_controle.php
| ... | ... | @@ -93,15 +93,6 @@ if (isset ($atlasId) || isset ($atlasId_)) |
| 93 | 93 | { |
| 94 | 94 | $map_file = ""; |
| 95 | 95 | } |
| 96 | -// | |
| 97 | -// define $map_file para o programa poder continuar | |
| 98 | -// esse caso acontece na lista de atlas inicial | |
| 99 | -// | |
| 100 | -if (!isset($atlasxml)) | |
| 101 | -{ | |
| 102 | - include_once("../ms_configura.php"); | |
| 103 | - $map_file = ""; | |
| 104 | -} | |
| 105 | 96 | if (isset ($g_sid)) |
| 106 | 97 | { |
| 107 | 98 | session_name("i3GeoPHP"); |
| ... | ... | @@ -112,6 +103,12 @@ if (isset ($g_sid)) |
| 112 | 103 | eval("\$".$k."='".$_SESSION[$k]."';"); |
| 113 | 104 | } |
| 114 | 105 | } |
| 106 | +if (!isset($atlasxml)) | |
| 107 | +{ | |
| 108 | + include_once("../ms_configura.php"); | |
| 109 | + $map_file = ""; | |
| 110 | +} | |
| 111 | + | |
| 115 | 112 | if (isset($debug) && $debug == "sim") |
| 116 | 113 | {error_reporting(E_ALL);} |
| 117 | 114 | // |
| ... | ... | @@ -125,16 +122,7 @@ require_once("../classesjs/cpaint/cpaint2.inc.php"); |
| 125 | 122 | // |
| 126 | 123 | $cp = new cpaint(); |
| 127 | 124 | $cp->set_data(""); |
| 128 | -if ($funcao == "criaMapa") | |
| 129 | -{ | |
| 130 | - session_destroy(); | |
| 131 | - include("../ms_configura.php"); | |
| 132 | - chdir($locaplic); | |
| 133 | - $interface = "mashup"; | |
| 134 | - include("../ms_criamapa.php"); | |
| 135 | - $cp->set_data(session_id()); | |
| 136 | - $cp->return_data(); | |
| 137 | -} | |
| 125 | + | |
| 138 | 126 | if (!isset($map_file)) |
| 139 | 127 | { |
| 140 | 128 | //nesse caso é necessário criar o diretório temporário e iniciar o mapa |
| ... | ... | @@ -184,6 +172,7 @@ Esse programa é chamado diretamente, por exemplo, i3geo/classesphp/atlas_control |
| 184 | 172 | */ |
| 185 | 173 | case "criaAtlas": |
| 186 | 174 | include("classe_atlas.php"); |
| 175 | + $atlasxmltemp = $atlasxml; | |
| 187 | 176 | $atl = new Atlas($atlasxml); |
| 188 | 177 | $interface = $atl->criaAtlas($atlasId_); |
| 189 | 178 | if ($interface == "") |
| ... | ... | @@ -232,9 +221,10 @@ else |
| 232 | 221 | {exit();} |
| 233 | 222 | function gravaid() |
| 234 | 223 | { |
| 235 | - global $atlasId_,$tmpfname;//a variavel tmpfname vem do ms_criamapa.php | |
| 224 | + global $atlasId_,$tmpfname,$atlasxmltemp;//a variavel tmpfname vem do ms_criamapa.php | |
| 236 | 225 | $_SESSION["atlasId"] = $atlasId_; |
| 237 | 226 | $_SESSION["utilizacgi"] = "nao"; |
| 227 | + $_SESSION["atlasxml"] = $atlasxmltemp; | |
| 238 | 228 | $m = ms_newMapObj($tmpfname); |
| 239 | 229 | $nomes = $m->getalllayernames(); |
| 240 | 230 | foreach($nomes as $n) | ... | ... |