Fix: not used DOL_DATA_ROOT

This commit is contained in:
Regis Houssin 2009-05-06 13:55:50 +00:00
parent daddd8316c
commit 2f2a2d9746

View File

@ -86,7 +86,7 @@ if ($what == 'mysql')
dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $mysqldump,'chaine',0,'',$conf->entity); dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $mysqldump,'chaine',0,'',$conf->entity);
} }
create_exdir(DOL_DATA_ROOT.'/admin/temp'); create_exdir($conf->admin->dir_temp);
// Parameteres execution // Parameteres execution
$command=$mysqldump; $command=$mysqldump;
@ -130,15 +130,12 @@ if ($what == 'mysql')
$paramclear.=" -p".$dolibarr_main_db_pass; $paramclear.=" -p".$dolibarr_main_db_pass;
} }
$relativepathdir='/admin/temp'; $outputdir = $conf->admin->dir_temp;
$relativepathfile=$relativepathdir.'/'.$file; $outputfile = $outputdir.'/'.$file;
// for compression format, we add extension // for compression format, we add extension
if ($compression == 'gz') $relativepathfile.='.gz'; if ($compression == 'gz') $outputfile.='.gz';
if ($compression == 'bz') $relativepathfile.='.bz2'; if ($compression == 'bz') $outputfile.='.bz2';
$relativepatherr=$relativepathfile.'.err'; $outputerror = $outputfile.'.err';
$outputdir=DOL_DATA_ROOT.$relativepathdir;
$outputfile=DOL_DATA_ROOT.$relativepathfile;
$outputerror=DOL_DATA_ROOT.$relativepatherr;
print $langs->trans("RunCommandSummary").':<br>'."\n"; print $langs->trans("RunCommandSummary").':<br>'."\n";
print '<textarea rows="1" cols="120">'.$command." ".$paramcrypted.'</textarea><br>'."\n"; print '<textarea rows="1" cols="120">'.$command." ".$paramcrypted.'</textarea><br>'."\n";
@ -227,7 +224,7 @@ if ($what)
} }
} }
$result=$formfile->show_documents('systemtools','',DOL_DATA_ROOT.'/admin/temp',$_SERVER['PHP_SELF'],0,1,'',array(),0,0,48,0,'',$langs->trans("Files")); $result=$formfile->show_documents('systemtools','',$conf->admin->dir_temp,$_SERVER['PHP_SELF'],0,1,'',array(),0,0,48,0,'',$langs->trans("Files"));
if ($result == 0) if ($result == 0)
{ {