diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 1500dd0dc4d..d5a63b95135 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -413,11 +413,6 @@ print '
'; // Define compressions array $compression=array(); if (in_array($type, array('mysql', 'mysqli'))) { - $compression['none'] = array( - 'function' => '', - 'id' => 'radio_compression_none', - 'label' => $langs->trans("None") - ); $compression['gz'] = array( 'function' => 'gzopen', 'id' => 'radio_compression_gzip', @@ -434,13 +429,18 @@ if (in_array($type, array('mysql', 'mysqli'))) { 'id' => 'radio_compression_bzip', 'label' => $langs->trans("Bzip2") ); + $compression['none'] = array( + 'function' => '', + 'id' => 'radio_compression_none', + 'label' => $langs->trans("None") + ); } else { $compression['none'] = array( 'function' => '', 'id' => 'radio_compression_none', - 'label' => $langs->trans("Default") + 'label' => $langs->trans("None") ); $compression['gz'] = array( 'function' => 'gzopen', @@ -455,11 +455,14 @@ print "\n"; print $langs->trans("Compression").':   '; +$i = 0; foreach($compression as $key => $val) { if (! $val['function'] || function_exists($val['function'])) { // Enabled export format - print ''; + $checked = ''; + if ($key == 'gz') $checked = ' checked'; + print ''; print ' '; } else @@ -467,9 +470,10 @@ foreach($compression as $key => $val) // Disabled export format print ''; print ' '; - print ' ('.$langs->trans("NotAvailable").')'; + print ' ('.$langs->trans("NotAvailable").')'; } print '     '; + $i++; } print ''; @@ -542,6 +546,7 @@ print "\n"; print '
'; print ''; print ''; +print ''; print '
2'; @@ -561,28 +566,33 @@ print '
'; // Show compression choices +// Example: With gz choice, you can compress in 5mn, a file of 2GB directory (after compression) with 10 Mb memory. print '
'; print "\n"; print $langs->trans("Compression").':   '; $filecompression = $compression; -array_shift($filecompression); +unset($filecompression['none']); $filecompression['zip']= array('function' => 'dol_compress_dir', 'id' => 'radio_compression_zip', 'label' => $langs->trans("FormatZip")); +$i = 0; foreach($filecompression as $key => $val) { if (! $val['function'] || function_exists($val['function'])) // Enabled export format { - print ''; + $checked = ''; + if ($key == 'gz') $checked = ' checked'; + print ''; print ' '; } else // Disabled export format { print ''; print ' '; - print ' ('.$langs->trans("NotAvailable").')'; + print ' ('.$langs->trans("NotAvailable").')'; } print '     '; + $i++; } print '
'; @@ -600,7 +610,7 @@ print '
'; $filearray=dol_dir_list($conf->admin->dir_output.'/documents', 'files', 0, '', '', $sortfield, (strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC), 1); -$result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'documents/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousDumpFiles")); +$result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'documents/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("ArchiveFiles")); print '
'; print '
'; diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index 04bf1fac7dd..e498492ed34 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -18,8 +18,8 @@ */ /** - * \file htdocs/admin/tools/export.php - * \brief Page to export a database into a dump file + * \file htdocs/admin/tools/export_files.php + * \brief Page to export documents into a compressed file */ require '../../main.inc.php'; @@ -73,7 +73,7 @@ if ($action == 'delete') */ // Increase limit of time. Works only if we are not in safe mode -$ExecTimeLimit=600; +$ExecTimeLimit=1800; // 30mn if (!empty($ExecTimeLimit)) { $err=error_reporting(); @@ -88,7 +88,7 @@ if (!empty($MemoryLimit)) @ini_set('memory_limit', $MemoryLimit); } -$form=new Form($db); +$form = new Form($db); $formfile = new FormFile($db); //$help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad'; @@ -115,7 +115,14 @@ if ($compression == 'zip') $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.log|\/temp\/|documents\/admin\/documents\/)/'); if ($ret < 0) { - $errormsg = $langs->trans("ErrorFailedToWriteInDir", $outputdir); + if ($ret == -2) { + $langs->load("errors"); + $errormsg = $langs->trans("ErrNoZipEngine"); + } + else { + $langs->load("errors"); + $errormsg = $langs->trans("ErrorFailedToWriteInDir", $outputdir); + } } } elseif (in_array($compression, array('gz', 'bz'))) diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php index a5bc992a1ca..3d708101d13 100644 --- a/htdocs/core/js/lib_foot.js.php +++ b/htdocs/core/js/lib_foot.js.php @@ -158,7 +158,7 @@ print ' } else { - console.log("We click on tag with .reposition class but element is not an html tag, so we try to update input form field page_y with value "+page_y); + console.log("We click on tag with .reposition class but element is not an html tag, so we try to update input form field with name=page_y with value "+page_y); jQuery("input[type=hidden][name=page_y]").val(page_y); } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4e55a219d38..ba47a1bcb76 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6040,7 +6040,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null)); $substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); $substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, 'day', 0, $outputlangs) : ''); - $substitutionarray['__SUPPLIER_ORDER_DELAY_DELIVERY__'] = (isset($object->availability_code) ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : ''); + $substitutionarray['__SUPPLIER_ORDER_DELAY_DELIVERY__'] = $outputlangs->transnoentities("AvailabilityType".$object->availability_code)!=('AvailabilityType'.$object->availability_code)?$outputlangs->transnoentities("AvailabilityType".$object->availability_code):$outputlangs->convToOutputCharset(isset($object->availability)?$object->availability:''); $birthday = dol_print_date($object->birth, 'day'); diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 26a210f40e0..9cc287cd28a 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -991,7 +991,9 @@ if ((empty($id) && empty($ref)) || $action == 'add' || $action == 'request' || $ { $nb_type = $object->getCPforUser($user->id, $val['rowid']); $nb_holiday += $nb_type; - $out .= ' - '.$val['label'].': '.($nb_type ?price2num($nb_type) : 0).'
'; + + $out .= ' - ' . ($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']) .': '.($nb_type ?price2num($nb_type) : 0).'
'; + //$out .= ' - '.$val['label'].': '.($nb_type ?price2num($nb_type) : 0).'
'; } print $langs->trans('SoldeCPUser', round($nb_holiday, 5)).'
'; print $out; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 020e61f721a..c75059ef4b2 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1156,7 +1156,7 @@ NoEventOrNoAuditSetup=No security event has been logged. This is normal if Audit NoEventFoundWithCriteria=No security event has been found for this search criteria. SeeLocalSendMailSetup=See your local sendmail setup BackupDesc=A complete backup of a Dolibarr installation requires two steps. -BackupDesc2=Backup the contents of the "documents" directory (%s) containing all uploaded and generated files. This will also include all the dump files generated in Step 1. +BackupDesc2=Backup the contents of the "documents" directory (%s) containing all uploaded and generated files. This will also include all the dump files generated in Step 1. This operation may last several minutes. BackupDesc3=Backup the structure and contents of your database (%s) into a dump file. For this, you can use the following assistant. BackupDescX=The archived directory should be stored in a secure place. BackupDescY=The generated dump file should be stored in a secure place.