Skip to content
Snippets Groups Projects
Commit 6d03ba22 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix consistency of backup result message

parent e230d72c
No related branches found
No related tags found
No related merge requests found
...@@ -439,6 +439,26 @@ print "\n"; ...@@ -439,6 +439,26 @@ print "\n";
<div align="center"><input type="submit" class="button" <div align="center"><input type="submit" class="button"
value="<?php echo $langs->trans("GenerateBackup") ?>" id="buttonGo" /><br> value="<?php echo $langs->trans("GenerateBackup") ?>" id="buttonGo" /><br>
<br> <br>
<?php
if (! empty($_SESSION["commandbackuplastdone"]))
{
print '<br><b>'.$langs->trans("RunCommandSummary").':</b><br>'."\n";
print '<textarea rows="'.ROWS_2.'" class="centpercent">'.$_SESSION["commandbackuplastdone"].'</textarea><br>'."\n";
print '<br>';
//print $paramclear;
// Now run command and show result
print '<b>'.$langs->trans("BackupResult").':</b> ';
print $_SESSION["commandbackupresult"];
$_SESSION["commandbackuplastdone"]='';
$_SESSION["commandbackuptorun"]='';
$_SESSION["commandbackupresult"]='';
}
?>
</div> </div>
<?php <?php
......
...@@ -70,6 +70,10 @@ if ($action == 'delete') ...@@ -70,6 +70,10 @@ if ($action == 'delete')
* View * View
*/ */
$_SESSION["commandbackuplastdone"]='';
$_SESSION["commandbackuptorun"]='';
$_SESSION["commandbackupresult"]='';
// Increase limit of time. Works only if we are not in safe mode // Increase limit of time. Works only if we are not in safe mode
$ExecTimeLimit=600; $ExecTimeLimit=600;
if (!empty($ExecTimeLimit)) if (!empty($ExecTimeLimit))
...@@ -354,21 +358,24 @@ if ($what == 'postgresql') ...@@ -354,21 +358,24 @@ if ($what == 'postgresql')
if ($errormsg) if ($errormsg)
{ {
setEventMessage($langs->trans("Error")." : ".$errormsg, 'errors'); setEventMessage($langs->trans("Error")." : ".$errormsg, 'errors');
/*
print '<div class="error">'.$langs->trans("Error")." : ".$errormsg.'</div>'; $resultstring='';
print '<br>'; $resultstring.='<div class="error">'.$langs->trans("Error")." : ".$errormsg.'</div>';
print '<br>';*/
$_SESSION["commandbackupresult"]=$resultstring;
} }
else else
{ {
if ($what) if ($what)
{ {
setEventMessage($langs->trans("BackupFileSuccessfullyCreated").'.<br>'.$langs->trans("YouCanDownloadBackupFile")); setEventMessage($langs->trans("BackupFileSuccessfullyCreated").'.<br>'.$langs->trans("YouCanDownloadBackupFile"));
/*print '<div class="ok">';
print $langs->trans("BackupFileSuccessfullyCreated").'.<br>'; $resultstring='<div class="ok">';
print $langs->trans("YouCanDownloadBackupFile"); $resultstring.=$langs->trans("BackupFileSuccessfullyCreated").'.<br>';
print '</div>'; $resultstring.=$langs->trans("YouCanDownloadBackupFile");
print '<br>';*/ $resultstring.='<div>';
$_SESSION["commandbackupresult"]=$resultstring;
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment