Fix: Option of mysql dump was using postgressql choices.
This commit is contained in:
parent
fd38debbec
commit
8fedb1327b
@ -72,8 +72,22 @@ if ($_GET["msg"])
|
||||
<script type="text/javascript" language="javascript">
|
||||
//<![CDATA[
|
||||
function hide_them_all() {
|
||||
<?php
|
||||
if ($db->label == 'MySQL')
|
||||
{
|
||||
?>
|
||||
document.getElementById("mysql_options").style.display = 'none';
|
||||
document.getElementById("postgresql_options").style.display = 'none';
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($db->label == 'PostgreSQL')
|
||||
{
|
||||
?>
|
||||
document.getElementById("postgresql_options").style.display = 'none';
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
}
|
||||
|
||||
function show_checked_option() {
|
||||
@ -149,7 +163,10 @@ else
|
||||
|
||||
<div id="div_container_sub_exportoptions">
|
||||
|
||||
|
||||
<?php
|
||||
if ($db->label == 'MySQL')
|
||||
{
|
||||
?>
|
||||
<!-- Fieldset mysqldump -->
|
||||
<fieldset id="mysql_options">
|
||||
<legend><?php echo $langs->trans("MySqlExportParameters"); ?></legend>
|
||||
@ -281,8 +298,12 @@ else
|
||||
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
if ($db->label == 'PostgreSQL')
|
||||
{
|
||||
?>
|
||||
<!-- Fieldset pg_dump -->
|
||||
<fieldset id="postgresql_options">
|
||||
<legend><?php echo $langs->trans("PostgreSqlExportParameters"); ?></legend>
|
||||
@ -362,7 +383,9 @@ else
|
||||
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<!--
|
||||
@ -661,7 +684,7 @@ if (window.parent.frames[1]) {
|
||||
<?php
|
||||
|
||||
|
||||
$result=$formfile->show_documents('systemtools','',DOL_DATA_ROOT.'/admin/temp',$_SERVER['PHP_SELF'],0,1,'','',0,0,54,0,'',$langs->trans("PreviousDumpFiles"));
|
||||
$result=$formfile->show_documents('systemtools','backup',$conf->admin->dir_output.'/backup',$_SERVER['PHP_SELF'],0,1,'','',0,0,54,0,'',$langs->trans("PreviousDumpFiles"));
|
||||
//if ($result) print '<br><br>';
|
||||
|
||||
|
||||
|
||||
@ -86,14 +86,14 @@ if ($what == 'mysql')
|
||||
dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $cmddump,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
$outputdir = $conf->admin->dir_temp;
|
||||
$outputdir = $conf->admin->dir_output.'/backup';
|
||||
$outputfile = $outputdir.'/'.$file;
|
||||
// for compression format, we add extension
|
||||
$compression=isset($_POST['compression']) ? $_POST['compression'] : 'none';
|
||||
if ($compression == 'gz') $outputfile.='.gz';
|
||||
if ($compression == 'bz') $outputfile.='.bz2';
|
||||
$outputerror = $outputfile.'.err';
|
||||
create_exdir($conf->admin->dir_temp);
|
||||
create_exdir($conf->admin->dir_output.'/backup');
|
||||
|
||||
// Parameteres execution
|
||||
$command=$cmddump;
|
||||
@ -195,7 +195,7 @@ if ($what == 'mysql')
|
||||
{
|
||||
// Renommer fichier sortie en fichier erreur
|
||||
//print "$outputfile -> $outputerror";
|
||||
dol_delete_file($outputerror,1);
|
||||
@dol_delete_file($outputerror,1);
|
||||
@rename($outputfile,$outputerror);
|
||||
// Si safe_mode on et command hors du parametre exec, on a un fichier out vide donc errormsg vide
|
||||
if (! $errormsg) $errormsg=$langs->trans("ErrorFailedToRunExternalCommand");
|
||||
@ -213,14 +213,14 @@ if ($what == 'postgresql')
|
||||
dolibarr_set_const($db, 'SYSTEMTOOLS_POSTGRESQLDUMP', $cmddump,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
$outputdir = $conf->admin->dir_temp;
|
||||
$outputdir = $conf->admin->dir_output.'/backup';
|
||||
$outputfile = $outputdir.'/'.$file;
|
||||
// for compression format, we add extension
|
||||
$compression=isset($_POST['compression']) ? $_POST['compression'] : 'none';
|
||||
if ($compression == 'gz') $outputfile.='.gz';
|
||||
if ($compression == 'bz') $outputfile.='.bz2';
|
||||
$outputerror = $outputfile.'.err';
|
||||
create_exdir($conf->admin->dir_temp);
|
||||
create_exdir($conf->admin->dir_output.'/backup');
|
||||
|
||||
// Parameteres execution
|
||||
$command=$cmddump;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user