Fix for export

This commit is contained in:
Laurent Destailleur 2024-02-06 18:41:45 +01:00
parent 8b8aa3a27f
commit c66b434c80
3 changed files with 11 additions and 0 deletions

View File

@ -279,6 +279,12 @@ if (in_array($type, array('mysql', 'mysqli'))) {
print '</label>';
print '<br>';
print '<input type="checkbox" name="use_force" value="no" id="checkbox_use_force" />';
print '<label for="checkbox_use_force">';
print $form->textwithpicto($langs->trans('ExportUseForce'), $langs->trans('ExportUseForceHelp'));
print '</label>';
print '<br>';
$execmethod = 0;
if (getDolGlobalString('MAIN_EXEC_USE_POPEN')) {
$execmethod = $conf->global->MAIN_EXEC_USE_POPEN;

View File

@ -322,6 +322,9 @@ class Utils
if (GETPOST("use_mysql_quick_param", "alpha")) {
$param .= " --quick";
}
if (GETPOST("use_force", "alpha")) {
$param .= " -f";
}
if (GETPOST("sql_structure", "alpha") || $usedefault) {
if (GETPOST("drop", "alpha") || $usedefault) {
$param .= " --add-drop-table=TRUE";

View File

@ -2440,3 +2440,5 @@ ParametersForTestEnvironment=Parameters for test environment
TryToKeepOnly=Try to keep only %s
RecommendedForProduction=Recommended for Production
RecommendedForDebug=Recommended for Debug
ExportUseForce=Use the parameter -f
ExportUseForceHelp=Force to continue the export even when an error is found (Backup may not be reliable)