diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index aec78f8aaace2..c1f44b7c79103 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -111,11 +111,6 @@ function hideoptions () { print_fiche_titre($langs->trans("Backup"),'','setup'); print $langs->trans("BackupDesc",DOL_DATA_ROOT).'

'; -print $langs->trans("BackupDesc2",DOL_DATA_ROOT).'
'; -print $langs->trans("BackupDescX").'

'; -print $langs->trans("BackupDesc3",DOL_DATA_ROOT).'
'; -print $langs->trans("BackupDescY").'

'; - ?> @@ -124,9 +119,29 @@ function hideoptions () { name="token" value="" /> -
-'.$langs->trans("DatabaseName").' : '.$dolibarr_main_db_name.''; ?> - +
1 + +trans("BackupDesc3",$dolibarr_main_db_name).'
'; +//print $langs->trans("BackupDescY").'
'; +print '
'; +?> + +
+ +trans("BackupDumpWizard")); + +print '
'; +print ''; +print ''; +print ''; +print '
'; +print $langs->trans("DatabaseName").' : '.$dolibarr_main_db_name.'
'; +print '
'; +?> +
@@ -182,7 +197,7 @@ function hideoptions () { $fullpathofmysqldump=$conf->global->SYSTEMTOOLS_MYSQLDUMP; } ?>
-
@@ -317,7 +332,7 @@ function hideoptions () { $fullpathofpgdump=$conf->global->SYSTEMTOOLS_POSTGRESQLDUMP; } ?>
- @@ -357,12 +372,12 @@ function hideoptions () {
- -
-trans("Destination"); ?> -: - +trans("Destination"); ?> --> +
+
+
+?> +
+
'; +?> - + +
+
admin->dir_output.'/backup','files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1); $result=$formfile->list_of_documents($filearray,null,'systemtools','',1,'backup/',1,0,$langs->trans("NoBackupFileAvailable"),0,$langs->trans("PreviousDumpFiles")); print '
'; +?> + +
+
+
+ +
+ +
2 +trans("BackupDesc2",DOL_DATA_ROOT).'
'; +print $langs->trans("BackupDescX").'

'; +?> +
+ + + + +trans("Restore"),'','setup'); print $langs->trans("RestoreDesc",DOL_DATA_ROOT).'

'; +?> +
+1 +trans("RestoreDesc2",DOL_DATA_ROOT).'

'; -print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'

'; +?> +
+
+ +
+2 +trans("RestoreDesc3",$dolibarr_main_db_name).'

'; ?> -
-'.$langs->trans("DatabaseName").' : '.$dolibarr_main_db_name.''; ?> +trans("DatabaseName").' : '.$dolibarr_main_db_name.''; ?>

+
use_javascript_ajax) { ?> diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 1668e4f4c672c..ba3da7b443cea 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -88,10 +88,10 @@ $form=new Form($db); $formfile = new FormFile($db); -$help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad'; -llxHeader('','',$help_url); +//$help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad'; +//llxHeader('','',$help_url); -print_fiche_titre($langs->trans("Backup"),'','setup'); +//print_fiche_titre($langs->trans("Backup"),'','setup'); // Start with empty buffer @@ -165,13 +165,18 @@ $paramclear.=' -p"'.str_replace(array('"','`'),array('\"','\`'),$dolibarr_main_db_pass).'"'; } + $_SESSION["commandbackuplastdone"]=$command." ".$paramcrypted; + $_SESSION["commandbackuptorun"]=""; + /* print ''.$langs->trans("RunCommandSummary").':
'."\n"; print '
'."\n"; print '
'; + //print $paramclear; // Now run command and show result print ''.$langs->trans("BackupResult").': '; + */ $errormsg=''; @@ -264,6 +269,9 @@ { backup_tables($outputfile); } + + $_SESSION["commandbackuplastdone"]=""; + $_SESSION["commandbackuptorun"]=""; } // POSTGRESQL @@ -320,7 +328,9 @@ $paramcrypted.=" -w ".$dolibarr_main_db_name; $paramclear.=" -w ".$dolibarr_main_db_name; - print $langs->trans("RunCommandSummaryToLaunch").':
'."\n"; + $_SESSION["commandbackuplastdone"]=""; + $_SESSION["commandbackuptorun"]=$command." ".$paramcrypted; + /*print $langs->trans("RunCommandSummaryToLaunch").':
'."\n"; print '
'."\n"; print '
'; @@ -330,7 +340,7 @@ print $langs->trans("YouMustRunCommandFromCommandLineAfterLoginToUser",$dolibarr_main_db_user,$dolibarr_main_db_user); print '
'; - print '
'; + print '
';*/ $what=''; } @@ -339,33 +349,45 @@ // Si on a demande une generation -if ($what) -{ +//if ($what) +//{ if ($errormsg) { + setEventMessage($langs->trans("Error")." : ".$errormsg, 'errors'); + /* print '
'.$langs->trans("Error")." : ".$errormsg.'
'; - // print ''.$langs->trans("DownloadErrorFile").'
'; - print '
'; print '
'; + print '
';*/ } else - { - print '
'; - print $langs->trans("BackupFileSuccessfullyCreated").'.
'; - print $langs->trans("YouCanDownloadBackupFile"); - print '
'; - print '
'; + { + if ($what) + { + setEventMessage($langs->trans("BackupFileSuccessfullyCreated").'.
'.$langs->trans("YouCanDownloadBackupFile")); + /*print '
'; + print $langs->trans("BackupFileSuccessfullyCreated").'.
'; + print $langs->trans("YouCanDownloadBackupFile"); + print '
'; + print '
';*/ + } + else + { + setEventMessage($langs->trans("YouMustRunCommandFromCommandLineAfterLoginToUser",$dolibarr_main_db_user,$dolibarr_main_db_user)); + } } -} +//} +/* $filearray=dol_dir_list($conf->admin->dir_output.'/backup','files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1); $result=$formfile->list_of_documents($filearray,null,'systemtools','',1,'backup/',1,0,($langs->trans("NoBackupFileAvailable").'
'.$langs->trans("ToBuildBackupFileClickHere",DOL_URL_ROOT.'/admin/tools/dolibarr_export.php')),0,$langs->trans("PreviousDumpFiles")); print '
'; +*/ -$time_end = time(); +// Redirect t backup page +header("Location: dolibarr_export.php"); -llxFooter(); +$time_end = time(); $db->close(); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 3d767ba8524c2..b24e108c80f3e 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1018,14 +1018,14 @@ NoEventOrNoAuditSetup=No security event has been recorded yet. This can be norma NoEventFoundWithCriteria=No security event has been found for such search criterias. SeeLocalSendMailSetup=See your local sendmail setup BackupDesc=To make a complete backup of Dolibarr, you must: -BackupDesc2=* Save content of documents directory (%s) that contains all uploaded and generated files (you can make a zip for example). -BackupDesc3=* Save content of your database into a dump file. For this, you can use following assistant. +BackupDesc2=Save content of documents directory (%s) that contains all uploaded and generated files (you can make a zip for example). +BackupDesc3=Save content of your database (%s) into a dump file. For this, you can use following assistant. BackupDescX=Archived directory should be stored in a secure place. BackupDescY=The generated dump file should be stored in a secure place. BackupPHPWarning=Backup can't be guaranted with this method. Prefer previous one RestoreDesc=To restore a Dolibarr backup, you must: -RestoreDesc2=* Restore archive file (zip file for example) of documents directory to extract tree of files in documents directory of a new Dolibarr installation or into this current documents directoy (%s). -RestoreDesc3=* Restore the data, from a backup dump file, into the database of the new Dolibarr installation or into the database of this current installation. Warning, once restore is finished, you must use a login/password, that existed when backup was made, to connect again. To restore a backup database into this current installation, you can follow this assistant. +RestoreDesc2=Restore archive file (zip file for example) of documents directory to extract tree of files in documents directory of a new Dolibarr installation or into this current documents directoy (%s). +RestoreDesc3=Restore the data, from a backup dump file, into the database of the new Dolibarr installation or into the database of this current installation (%s). Warning, once restore is finished, you must use a login/password, that existed when backup was made, to connect again. To restore a backup database into this current installation, you can follow this assistant. RestoreMySQL=MySQL import ForcedToByAModule= This rule is forced to %s by an activated module PreviousDumpFiles=Available database backup dump files @@ -1616,3 +1616,4 @@ ListOfNotificationsPerContact=List of notifications per contact* ListOfFixedNotifications=List of fixed notifications GoOntoContactCardToAddMore=Go on the tab "Notifications" of a thirdparty contact to add or remove notifications for contacts/addresses Threshold=Threshold +BackupDumpWizard=Wizard to build database backup dump file diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 0537d13b80d3f..b356f570cba27 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -269,7 +269,7 @@ border-bottom:solid 1px rgba(0,0,0,.2); /* box-shadow: 1px 1px 1px rgba(0,0,0,.2) inset;*/ padding:4px; - margin-left:1px; + margin-left:0px; margin-bottom:1px; margin-top:1px; }