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