Fix: Utilisation du wrapper sécurisé pour tous

This commit is contained in:
Laurent Destailleur 2004-12-31 18:40:16 +00:00
parent 0d5d32932d
commit a51e1dbc47
2 changed files with 16 additions and 40 deletions

View File

@ -160,10 +160,10 @@ if ($_POST["action"] == "set")
$ok = 1; $ok = 1;
} }
} }
/*************************************************************************************** /***************************************************************************************
* *
* * Chargement fichier data.sql
*
* *
***************************************************************************************/ ***************************************************************************************/
if ($ok == 1) if ($ok == 1)
@ -239,7 +239,6 @@ if ($_POST["action"] == "set")
}//else }//else
print "<tr><td>Chargement des données de base</td>"; print "<tr><td>Chargement des données de base</td>";
if ($ok) if ($ok)
{ {
@ -255,54 +254,33 @@ if ($_POST["action"] == "set")
/*************************************************************************************** /***************************************************************************************
* *
* * Les variables qui ecrase le chemin par defaut sont redéfinies
*
* *
***************************************************************************************/ ***************************************************************************************/
if ($ok == 1) if ($ok == 1)
{ {
$chem1 = "/facture";
$sql[0] = "UPDATE llx_const SET value = '".$dolibarr_main_data_root."/facture', $sql[0] = "UPDATE llx_const SET value = '".$dolibarr_main_data_root."/facture',
type = 'chaine', type = 'chaine',
visible = 0 visible = 0
where name ='FAC_OUTPUTDIR';" ; where name ='FAC_OUTPUTDIR';" ;
$sql[1] = "UPDATE llx_const SET value = '".$dolibarr_main_data_url."/document/facture', $sql[1] = "UPDATE llx_const SET value = '".$dolibarr_main_data_root."/propale',
type = 'chaine',
visible = 0
where name = 'FAC_OUTPUT_URL';" ;
$sql[2] = "UPDATE llx_const SET value = '".$dolibarr_main_data_root."/propale',
type = 'chaine', type = 'chaine',
visible = 0 visible = 0
where name = 'PROPALE_OUTPUTDIR';" ; where name = 'PROPALE_OUTPUTDIR';" ;
$sql[3] = "UPDATE llx_const SET value = '".$dolibarr_main_url_root."/document/propale', $sql[2] = "UPDATE llx_const SET value = '".$dolibarr_main_data_root."/ficheinter',
type = 'chaine',
visible = 0
where name = 'PROPALE_OUTPUT_URL';" ;
$sql[4] = "UPDATE llx_const SET value = '".$dolibarr_main_data_root."/ficheinter',
type = 'chaine', type = 'chaine',
visible = 0 visible = 0
where name = 'FICHEINTER_OUTPUTDIR';" ; where name = 'FICHEINTER_OUTPUTDIR';" ;
$sql[5] = "UPDATE llx_const SET value='".$dolibarr_main_url_root."/document/ficheinter', $sql[3] = "UPDATE llx_const SET value='".$dolibarr_main_data_root."/societe',
type = 'chaine', type = 'chaine',
visible = 0
where name = 'FICHEINTER_OUTPUT_URL';" ;
$sql[6] = "UPDATE llx_const SET value='".$dolibarr_main_data_root."/societe',
type = 'chaine',
visible = 0 visible = 0
where name = 'SOCIETE_OUTPUTDIR';" ; where name = 'SOCIETE_OUTPUTDIR';" ;
$sql[7] = "UPDATE llx_const SET value='".$dolibarr_main_url_root."/document/societe', $sql[4] = "DELETE from llx_const where name like '%_OUTPUT_URL';";
type = 'chaine',
visible = 0
where name = 'SOCIETE_OUTPUT_URL';" ;
$result = 0; $result = 0;
for ($i=0; $i < sizeof($sql);$i++) for ($i=0; $i < sizeof($sql);$i++)
@ -310,7 +288,6 @@ if ($_POST["action"] == "set")
if ($db->query($sql[$i])) if ($db->query($sql[$i]))
{ {
$result++; $result++;
} }
} }
@ -322,6 +299,8 @@ if ($_POST["action"] == "set")
} }
} }
} }
/*************************************************************************************** /***************************************************************************************
* *
* *
@ -329,6 +308,7 @@ if ($_POST["action"] == "set")
* *
***************************************************************************************/ ***************************************************************************************/
print '</table>'; print '</table>';
$db->close(); $db->close();

View File

@ -144,8 +144,7 @@ insert into llx_const (name, value, type) values ('OSC_CATALOG_URL','http://osc.
-- Factures -- Factures
-- --
insert into llx_const (name, value, type) values ('FAC_OUTPUTDIR','/htdocs/document/facture','chaine'); insert into llx_const (name, value, type) values ('FAC_OUTPUTDIR','/documents/facture','chaine');
insert into llx_const (name, value, type) values ('FAC_OUTPUT_URL','/htdocs/document/facture','chaine');
insert into llx_const (name, value, type) values ('FAC_PDF_INTITULE','Facture','chaine'); insert into llx_const (name, value, type) values ('FAC_PDF_INTITULE','Facture','chaine');
insert into llx_const (name, value, type) values ('FAC_PDF_MEL','facture@societe.com','chaine'); insert into llx_const (name, value, type) values ('FAC_PDF_MEL','facture@societe.com','chaine');
insert into llx_const (name, value, type) values ('FAC_PDF_WWW','http://www.societe.com','chaine'); insert into llx_const (name, value, type) values ('FAC_PDF_WWW','http://www.societe.com','chaine');
@ -158,22 +157,19 @@ insert into llx_const (name, value, type) values ('FAC_PDF_RCS','','chaine');
-- Propales -- Propales
-- --
insert into llx_const (name, value, type) values ('PROPALE_OUTPUTDIR','/htdocs/document/propale','chaine'); insert into llx_const (name, value, type) values ('PROPALE_OUTPUTDIR','/documents/propale','chaine');
insert into llx_const (name, value, type) values ('PROPALE_OUTPUT_URL','/htdocs/document/propale','chaine');
-- --
-- Ficheinter -- Ficheinter
-- --
insert into llx_const (name, value, type) values ('FICHEINTER_OUTPUTDIR','/htdocs/document/ficheinter','chaine'); insert into llx_const (name, value, type) values ('FICHEINTER_OUTPUTDIR','/documents/ficheinter','chaine');
insert into llx_const (name, value, type) values ('FICHEINTER_OUTPUT_URL','/htdocs/document/ficheinter','chaine');
-- --
-- société -- société
-- --
insert into llx_const (name, value, type) values ('SOCIETE_OUTPUTDIR','/htdocs/document/societe','chaine'); insert into llx_const (name, value, type) values ('SOCIETE_OUTPUTDIR','/documents/societe','chaine');
insert into llx_const (name, value, type) values ('SOCIETE_OUTPUT_URL','/htdocs/document/societe','chaine');
-- Dictionnaires llx_c -- Dictionnaires llx_c