Commit 6ed028d7c20efc1c6466a0408ac6d0fff49fd4bd

Authored by Adriano Vieira
1 parent 45042341
Exists in master and in 1 other branch 3.1

Gerente atualizado

- ToDo do instalador atualizado
- ToDo do CACIC atualizado
- Instalador não solicita o caminho da instalação (path e url)

git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/gerente@265 fecfc0c7-e812-0410-ae72-849f08638ee7
instalador/ToDo.php
... ... @@ -20,3 +20,12 @@ Necessidades para o instalador:
20 20 * Deve atualizar base de dados de versões anteriores.
21 21 * Deve realizar cópia de segurança da base de dados existente.
22 22 * Deve verificar caracteres "especiais" em campos que não podem conter.
  23 +OK * Excluir solicitação de caminhos (url e físico)
  24 + * Criar instalação multi-idioma
  25 + - deve mostrar licença traduzida no idioma selecionado
  26 +OK * Criar seletor de idiomas (deve ler os idiomas disponíveis em "language")
  27 + * Gravar idioma selecionado no config.php
  28 + * Criar opção de atualização de versões anteriores
  29 + * desmembrar "templates" (navbar) dos passos da instalação
  30 + * verificar seriviço FTP
  31 + * validar formulários
23 32 \ No newline at end of file
... ...
instalador/classes/install.ajax.php
... ... @@ -58,8 +58,11 @@ class InstallAjax {
58 58 * Processa as requisições AJAX
59 59 */
60 60 function processAjax() {
61   - if(isset($_POST['cacic_config']))
  61 + if(isset($_POST['cacic_config'])) {
62 62 $_SESSION['cacic_config'] = $_POST['cacic_config'];
  63 + $_SESSION['cacic_config']['path'] = CACIC_PATH;
  64 + $_SESSION['cacic_config']['url'] = CACIC_URL;
  65 + }
63 66  
64 67 if(isset($_POST['cacic_admin']))
65 68 $_SESSION['cacic_admin'] = $_POST['cacic_admin'];
... ...
instalador/classes/install.php
... ... @@ -57,8 +57,11 @@ class Install {
57 57 function __construct() {
58 58 global $oTranslator;
59 59 $this->oLang = $oTranslator;
60   - if(isset($_POST['cacic_config']))
  60 + if(isset($_POST['cacic_config'])) {
61 61 $_SESSION['cacic_config'] = $_POST['cacic_config'];
  62 + $_SESSION['cacic_config']['path'] = CACIC_PATH;
  63 + $_SESSION['cacic_config']['url'] = CACIC_URL;
  64 + }
62 65  
63 66 if(isset($_POST['cacic_admin']))
64 67 $_SESSION['cacic_admin'] = $_POST['cacic_admin'];
... ... @@ -174,7 +177,8 @@ class Install {
174 177 /*
175 178 * verifica se é possivel escrever o arquivo de configurações para o CACIC
176 179 */
177   - if (is_writable(CACIC_CFGFILE_PATH.CACIC_DS."config.php")) {
  180 + if ((is_writable(CACIC_CFGFILE_PATH) and !file_exists(CACIC_CFGFILE_PATH.CACIC_DS."config.php")) or
  181 + (file_exists(CACIC_CFGFILE_PATH.CACIC_DS."config.php") and is_writable(CACIC_CFGFILE_PATH.CACIC_DS."config.php"))) {
178 182 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CFGFILE_STATUS', $oTranslator->_('kciq_msg yes'));
179 183 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CFGFILE_CLASS', "SimImg");
180 184 $_SESSION['saveCfgFile'] = true;
... ...
instalador/templates/install_navbar.tmpl
... ... @@ -46,19 +46,19 @@
46 46 <tr>
47 47 <td>{KCIQ_MSG_LICENSE_ADVISE}</td>
48 48 </tr>
49   - <tr id="gpl-pt" >
  49 + <tr id="gpl-en">
50 50 <td>
51 51 <fieldset>
52   - <legend>{KCIQ_MSG_LICENSE_TITLE} (<span class="togleLang" onclick="toggleDetails('gpl-pt');toggleDetails('gpl-en');">{KCIQ_MSG_LICENSE_EN-READ}</span>)</legend>
53   - <pre><cacicInstall:tmpl src="../../licenca.txt" parser="off" /></pre>
  52 + <legend>{KCIQ_MSG_LICENSE_TITLE} (<span class="togleLang" onclick="toggleDetails('gpl-pt');toggleDetails('gpl-en');">{KCIQ_MSG_LICENSE_PT-READ}</span>)</legend>
  53 + <pre><cacicInstall:tmpl src="../../license.txt" parser="on" /></pre>
54 54 </fieldset>
55 55 </td>
56 56 </tr>
57   - <tr id="gpl-en" style="display: none;">
  57 + <tr id="gpl-pt" style="display: none;">
58 58 <td>
59 59 <fieldset>
60   - <legend>{KCIQ_MSG_LICENSE_TITLE} (<span class="togleLang" onclick="toggleDetails('gpl-pt');toggleDetails('gpl-en');">{KCIQ_MSG_LICENSE_PT-READ}</span>)</legend>
61   - <pre><cacicInstall:tmpl src="../../license.txt" parser="on" /></pre>
  60 + <legend>{KCIQ_MSG_LICENSE_TITLE} (<span class="togleLang" onclick="toggleDetails('gpl-pt');toggleDetails('gpl-en');">{KCIQ_MSG_LICENSE_EN-READ}</span>)</legend>
  61 + <pre><cacicInstall:tmpl src="../../licenca.txt" parser="off" /></pre>
62 62 </fieldset>
63 63 </td>
64 64 </tr>
... ... @@ -264,24 +264,6 @@
264 264 </fieldset>
265 265 <fieldset>
266 266 <legend>Configurações</legend>
267   - <fieldset class="configinstall">
268   - <legend>Caminhos para a aplicação</legend>
269   - <table>
270   - <tr>
271   - <td class="item">
272   - <div align="left"><span class="necessario">*</span>Caminho físico:</div>
273   - <input disabled class="input" onFocus="setClass(this, 'inputFocus');" onBlur="setClass(this, 'input');" type="text" name="cacic_config[path]" value="{CACIC_PATH}" size="70" />
274   - <input class="input" onFocus="setClass(this, 'inputFocus');" onBlur="setClass(this, 'input');" type="hidden" name="cacic_config[path]" value="{CACIC_PATH}" size="70" />
275   - </td>
276   - <td class="help">Caminho físico (path) da instalação do CACIC</td>
277   - </tr>
278   - <tr>
279   - <td class="item"><div align="left"><span class="necessario">*</span>Caminho relativo:</div><input class="input" onFocus="setClass(this, 'inputFocus');" onBlur="setClass(this, 'input');" type="text" name="cacic_config[url]" value="{CACIC_URL}" size="70" />
280   - </td>
281   - <td class="help">Caminho relativo (URL) da instalação do CACIC</td>
282   - </tr>
283   - </table>
284   - </fieldset>
285 267 <fieldset class="configinstall">
286 268 <legend>Tipo de instalação</legend>
287 269 <table>
... ...
to-do.txt
... ... @@ -2,6 +2,6 @@ CACIC ToDo
2 2  
3 3 Acompanhe pelo site de desenvolvimento http://svn.softwarepublico.gov.br/trac/cacic
4 4  
5   -See the CACIC development site http://svn.softwarepublico.gov.br/trac/cacic
  5 +See on CACIC development site http://svn.softwarepublico.gov.br/trac/cacic
6 6  
7 7 Have fun
8 8 \ No newline at end of file
... ...