Fix: Must not use DOL_DATA_ROOT directly

This commit is contained in:
Laurent Destailleur 2009-04-29 18:44:37 +00:00
parent d0426108f4
commit 04915533f2
7 changed files with 43 additions and 39 deletions

View File

@ -293,6 +293,10 @@ class Conf
$this->boutique->album->enabled=defined("BOUTIQUE_ALBUM")?BOUTIQUE_ALBUM:0; $this->boutique->album->enabled=defined("BOUTIQUE_ALBUM")?BOUTIQUE_ALBUM:0;
// Module Barcode // Module Barcode
$this->barcode->dir_temp=$rootfordata."/barcode/temp"; $this->barcode->dir_temp=$rootfordata."/barcode/temp";
// Module stock
$this->stock->dir_temp=$rootfordata."/stock/temp";
// Module prelevement
$this->prelevement->dir_output=$rootfordata."/prelevement";
/* /*
* Modification de quelques variable de conf en fonction des Constantes * Modification de quelques variable de conf en fonction des Constantes

View File

@ -271,7 +271,7 @@ if ($modulepart)
elseif ($modulepart == 'graph_stock') elseif ($modulepart == 'graph_stock')
{ {
$accessallowed=1; $accessallowed=1;
$original_file=DOL_DATA_ROOT.'/entrepot/temp/'.$original_file; $original_file=$conf->stock->dir_temp.'/'.$original_file;
} }
// Wrapping pour les graph fournisseurs // Wrapping pour les graph fournisseurs
@ -318,7 +318,7 @@ if (! $accessallowed)
} }
// Security: // Security:
// On interdit les remont<EFBFBD>es de repertoire ainsi que les pipe dans // On interdit les remontees de repertoire ainsi que les pipe dans
// les noms de fichiers. // les noms de fichiers.
if (eregi('\.\.',$original_file) || eregi('[<>|]',$original_file)) if (eregi('\.\.',$original_file) || eregi('[<>|]',$original_file))
{ {

View File

@ -97,7 +97,7 @@ class pdf_courrier_editeur
$fichref = $year; $fichref = $year;
$dir = DOL_DATA_ROOT."/societe/courrier/" . get_exdir($id); $dir = $conf->societe->dir_output."/courrier/" . get_exdir($id);
$file = $dir . $fichref . ".pdf"; $file = $dir . $fichref . ".pdf";
if (! file_exists($dir)) if (! file_exists($dir))

View File

@ -71,7 +71,7 @@ $year = strftime('%Y',$now);
/* /*
* *
*/ */
$dir = DOL_DATA_ROOT."/product/temp"; $dir = $conf->produit->dir_output."/temp";
if (!is_dir($dir) ) if (!is_dir($dir) )
{ {
if (! create_exdir($dir,0755)) if (! create_exdir($dir,0755))

View File

@ -70,7 +70,7 @@ for ($i = 1 ; $i < sizeof($argv) ; $i++)
} }
$dir = DOL_DATA_ROOT."/entrepot/temp"; $dir = $conf->stock->dir_temp;
$result=create_exdir($dir); $result=create_exdir($dir);

View File

@ -224,7 +224,7 @@ if (sizeof($factures_prev) > 0)
{ {
$prev_id = $db->last_insert_id(MAIN_DB_PREFIX."prelevement_bons"); $prev_id = $db->last_insert_id(MAIN_DB_PREFIX."prelevement_bons");
$bonprev = new BonPrelevement($db, DOL_DATA_ROOT."/prelevement/bon/".$filebonprev); $bonprev = new BonPrelevement($db, $this->prelevement."/bon/".$filebonprev);
$bonprev->id = $prev_id; $bonprev->id = $prev_id;
} }
else else