From cad7bdc74be379faff4f72beb1e00e6cc9c93654 Mon Sep 17 00:00:00 2001 From: atm-ph Date: Wed, 21 Mar 2018 11:54:25 +0100 Subject: [PATCH 1/3] Fix documents are lost if we rename contrat ref --- htdocs/contrat/card.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 2409056cb1f..6e9d5d1bff0 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -872,12 +872,26 @@ if (empty($reshook)) if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - + + $old_ref = $object->ref; $result = $object->setValueFrom('ref', GETPOST('ref','alpha'), '', null, 'text', '', $user, 'CONTRACT_MODIFY'); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = 'editref'; } else { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $old_filedir = $conf->contrat->dir_output . '/' . dol_sanitizeFileName($old_ref); + $new_filedir = $conf->contrat->dir_output . '/' . dol_sanitizeFileName($object->ref); + + $files = dol_dir_list($old_filedir); + if (!empty($files)) + { + foreach ($files as $file) + { + dol_move($file['fullname'], $new_filedir.'/'.$file['name']); + } + } + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); exit; } From 2094c48b7fbe6edb6969e7e55ebfe6a172461aa6 Mon Sep 17 00:00:00 2001 From: atm-ph Date: Wed, 21 Mar 2018 12:14:04 +0100 Subject: [PATCH 2/3] Fix missing folder with multientity --- htdocs/contrat/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 6e9d5d1bff0..ccd21eecccd 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -886,6 +886,7 @@ if (empty($reshook)) $files = dol_dir_list($old_filedir); if (!empty($files)) { + if (!is_dir($new_filedir)) dol_mkdir($new_filedir); foreach ($files as $file) { dol_move($file['fullname'], $new_filedir.'/'.$file['name']); From 5efb94b06f1b529d33be4ccf4aa52b9eaafdccc9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Mar 2018 14:13:58 +0100 Subject: [PATCH 3/3] Prepare 5.0.6 --- ChangeLog | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/ChangeLog b/ChangeLog index 849d8b38855..dcc363d03a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,41 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + +***** ChangeLog for 6.0.6 compared to 6.0.6 ***** +FIX: #7974 Contract - Invalid reference on the document +FIX: #8139 +FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php +FIX: #8151 +FIX: #8200 +FIX: add planned delivery to order exports +FIX: a discount is a percent, not an amount, so we use vatrate not price +FIX: Avoid empty value to fk_multicurrency attribute +FIX: Bad localtaxes assignment in cashdesk +FIX: check shipping on delete order +FIX: check verif exped on delete order +FIX: creer into lire +FIX: Delete tasks on project delete will now trigger TASK_DELETE +FIX: Global on $user parameter reset the variable +FIX: if we make a mistake with situation_percent, now we can correct… +FIX: if we make a mistake with situation_percent, now we can correct it. before situation_final was always set to 1 and no way to go back +FIX: Import process must stop after ending line nb to import +FIX: migration script for product photo +FIX: natural search double quote +FIX: reverse field to have object loaded in doaction +FIX: Saving wrong localtax on order addline +FIX: show status on societe banner +FIX: solve column mismatch in user card's usergroup list + code cleanup +FIX: solve column mismatch in user card with multicompany transverse mode + code cleanup +FIX: unset categorie +FIX: update_extras on fourn card +FIX: warning when adding ECM files using old photo path +FIX: Withdrawals lines not filter by company name and not respect dropdown limit lines by page +NEW: Add sale representative einstein_pdf_modules +NEW_einstein_pdf_modules +NEW: field commerciaux and categ export CustomersInvoicesAndPayments + + ***** ChangeLog for 6.0.5 compared to 6.0.4 ***** FIX: security vulnerability reported by ADLab of Venustech CVE-2017-17897, CVE-2017-17898, CVE-2017-17899, CVE-2017-17900