Commit 1796e860361f70b93f79dc0b0cf2a30742e74df7
1 parent
32d37e66
Exists in
master
and in
7 other branches
Correç~ao nos parâmetros adicionais do testainstal.php
Showing
2 changed files
with
42 additions
and
44 deletions
Show diff stats
classesjs/classe_interface.js
... | ... | @@ -575,11 +575,26 @@ i3GEO.Interface = { |
575 | 575 | f.style.height = h+"px"; |
576 | 576 | } |
577 | 577 | i3GEO.Interface.IDMAPA = "openlayers"; |
578 | + i3GEO.Interface.openlayers.parametrosMap.controls = []; | |
579 | + i3GEO.Interface.openlayers.parametrosMap.fractionalZoom = false; | |
580 | + if(!i3GEO.Interface.openlayers.parametrosMap.minResolution){ | |
581 | + i3GEO.Interface.openlayers.parametrosMap.minResolution = "auto"; | |
582 | + } | |
583 | + if(!i3GEO.Interface.openlayers.parametrosMap.minExtent){ | |
584 | + i3GEO.Interface.openlayers.parametrosMap.minExtent = new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]); | |
585 | + } | |
586 | + if(!i3GEO.Interface.openlayers.parametrosMap.maxResolution){ | |
587 | + i3GEO.Interface.openlayers.parametrosMap.maxResolution = "auto"; | |
588 | + } | |
589 | + if(!i3GEO.Interface.openlayers.parametrosMap.maxExtent){ | |
590 | + i3GEO.Interface.openlayers.parametrosMap.maxExtent = new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3]); | |
591 | + } | |
592 | + if(!i3GEO.Interface.openlayers.parametrosMap.allOverlays){ | |
593 | + i3GEO.Interface.openlayers.parametrosMap.allOverlays = false; | |
594 | + } | |
578 | 595 | if(i3GEO.Interface.TABLET === true){ |
579 | - i3geoOL = new OpenLayers.Map({ | |
580 | - div: "openlayers", | |
581 | - theme: null, | |
582 | - controls: [ | |
596 | + i3GEO.Interface.openlayers.parametrosMap.theme = null; | |
597 | + i3GEO.Interface.openlayers.parametrosMap.controls = [ | |
583 | 598 | new OpenLayers.Control.Attribution(), |
584 | 599 | new OpenLayers.Control.TouchNavigation({ |
585 | 600 | dragPanOptions: { |
... | ... | @@ -588,32 +603,14 @@ i3GEO.Interface = { |
588 | 603 | } |
589 | 604 | }), |
590 | 605 | new OpenLayers.Control.ZoomPanel() |
591 | - ] | |
592 | - }); | |
606 | + ]; | |
593 | 607 | } |
594 | 608 | else{ |
595 | 609 | bb.INCLUIBOTAO.zoomli = true; |
596 | 610 | bb.INCLUIBOTAO.pan = true; |
597 | 611 | bb.INCLUIBOTAO.zoomtot = true; |
598 | - i3GEO.Interface.openlayers.parametrosMap.controls = []; | |
599 | - i3GEO.Interface.openlayers.parametrosMap.fractionalZoom = false; | |
600 | - if(!i3GEO.Interface.openlayers.parametrosMap.minResolution){ | |
601 | - i3GEO.Interface.openlayers.parametrosMap.minResolution = "auto"; | |
602 | - } | |
603 | - if(!i3GEO.Interface.openlayers.parametrosMap.minExtent){ | |
604 | - i3GEO.Interface.openlayers.parametrosMap.minExtent = new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]); | |
605 | - } | |
606 | - if(!i3GEO.Interface.openlayers.parametrosMap.maxResolution){ | |
607 | - i3GEO.Interface.openlayers.parametrosMap.maxResolution = "auto"; | |
608 | - } | |
609 | - if(!i3GEO.Interface.openlayers.parametrosMap.maxExtent){ | |
610 | - i3GEO.Interface.openlayers.parametrosMap.maxExtent = new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3]); | |
611 | - } | |
612 | - if(!i3GEO.Interface.openlayers.parametrosMap.allOverlays){ | |
613 | - i3GEO.Interface.openlayers.parametrosMap.allOverlays = false; | |
614 | - } | |
615 | - i3geoOL = new OpenLayers.Map('openlayers', i3GEO.Interface.openlayers.parametrosMap); | |
616 | 612 | } |
613 | + i3geoOL = new OpenLayers.Map('openlayers', i3GEO.Interface.openlayers.parametrosMap); | |
617 | 614 | }, |
618 | 615 | inicia: function(){ |
619 | 616 | // | ... | ... |
testainstal.php
... | ... | @@ -64,9 +64,9 @@ if(empty($_POST["senha"]) || empty($_POST["usuario"])){ |
64 | 64 | if (strtoupper(substr(PHP_OS, 0, 3) != 'WIN')){ |
65 | 65 | echo "<script>"; |
66 | 66 | echo "var f = document.getElementById('formularioLoginMaster');"; |
67 | - echo "var ins = '<br><br><input type=checkbox name=criaPastaMstmp unchecked /> Cria a pasta /tmp/ms_tmp<br><br>';"; | |
68 | - echo "ins += '<input type=checkbox name=criaLink unchecked /> Cria o link simbolico /var/www/ms_tmp<br><br>';"; | |
69 | - echo "ins += '<input type=checkbox name=permPastaI3geo unchecked /> Altera as permissoes da pasta /var/www/i3geo<br>';"; | |
67 | + echo "var ins = '<br><br><input type=checkbox name=criaPastaMstmp unchecked /> Cria a pasta $dir_tmp <br><br>';"; | |
68 | + echo "ins += '<input type=checkbox name=criaLink unchecked /> Cria o link simbolico ".__DIR__."/../ms_tmp <br><br>';"; | |
69 | + echo "ins += '<input type=checkbox name=permPastaI3geo unchecked /> Altera as permissoes da pasta $locaplic <br>';"; | |
70 | 70 | echo "f.innerHTML += ins;"; |
71 | 71 | |
72 | 72 | echo "</script>"; |
... | ... | @@ -113,42 +113,43 @@ if (get_cfg_var("safe_mode") == 1){ |
113 | 113 | |
114 | 114 | //executa as opcoes linux definidas no formulario |
115 | 115 | if($_POST["criaPastaMstmp"] == "on"){ |
116 | - echo "<br>Criando a pasta /tmp/ms_tmp\n"; | |
117 | - if(!file_exists("/tmp/ms_tmp")){ | |
118 | - @mkdir ("/tmp/ms_tmp",0777); | |
116 | + echo "<br>Criando a pasta $dir_tmp \n"; | |
117 | + if(!file_exists($dir_tmp)){ | |
118 | + @mkdir ($dir_tmp,0777); | |
119 | 119 | } |
120 | 120 | else{ |
121 | - chmod("/tmp/ms_tmp",0777); | |
121 | + chmod($dir_tmp,0777); | |
122 | 122 | } |
123 | - if(!file_exists("/tmp/ms_tmp")){ | |
124 | - echo "<span style=color:red >Arquivo /tmp/ms_tmp não pode ser criado\n"; | |
123 | + if(!file_exists($dir_tmp)){ | |
124 | + echo "<span style=color:red >Arquivo $dir_tmp não pode ser criado\n"; | |
125 | 125 | } |
126 | 126 | else{ |
127 | 127 | echo "...OK\n"; |
128 | 128 | } |
129 | 129 | } |
130 | 130 | if($_POST["criaLink"] == "on"){ |
131 | - echo "<br>Criando o link simbólico /var/www/ms_tmp\n"; | |
132 | - if(!file_exists("/var/www/ms_tmp")){ | |
133 | - @symlink("/tmp/ms_tmp","/var/www/ms_tmp"); | |
131 | + $d = __DIR__."/../ms_tmp"; | |
132 | + echo "<br>Criando o link simbólico $d \n"; | |
133 | + if(!file_exists($d)){ | |
134 | + @symlink($dir_tmp,$d); | |
134 | 135 | } |
135 | 136 | else{ |
136 | - chmod("/var/www/ms_tmp",0777); | |
137 | + chmod($d,0777); | |
137 | 138 | } |
138 | 139 | if(!file_exists("/var/www/ms_tmp")){ |
139 | - echo "<span style=color:red >Link /var/www/ms_tmp não pode ser criado\n"; | |
140 | + echo "<span style=color:red >Link $d não pode ser criado\n"; | |
140 | 141 | } |
141 | 142 | else{ |
142 | 143 | echo "...OK\n"; |
143 | 144 | } |
144 | 145 | } |
145 | 146 | if($_POST["permPastaI3geo"] == "on"){ |
146 | - echo "<br>Alterando permissões /var/www/i3geo i3geo/temas i3geo/admin i3geo/admin/admin.db\n"; | |
147 | - if(!file_exists("/var/www/i3geo")){ | |
148 | - chmod("/var/www/i3geo",0777); | |
149 | - chmod("/var/www/i3geo/temas",0777); | |
150 | - chmod("/var/www/i3geo/admin",0777); | |
151 | - chmod("/var/www/i3geo/admin/admin.db",0777); | |
147 | + echo "<br>Alterando permissões i3geo i3geo/temas i3geo/admin i3geo/admin/admin.db\n"; | |
148 | + if(file_exists($locaplic)){ | |
149 | + chmod($locaplic,0777); | |
150 | + chmod($locaplic."/temas",0777); | |
151 | + chmod($locaplic."/admin",0777); | |
152 | + chmod($locaplic."/admin/admin.db",0777); | |
152 | 153 | echo "...OK\n"; |
153 | 154 | } |
154 | 155 | } | ... | ... |