diff --git a/ChangeLog b/ChangeLog index c5ddefd980e..0de3ed5df3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -280,6 +280,23 @@ Following changes may create regression for some external modules, but were nece content by doing a print into function, sometimes by returning content into "resprint". This has been fixed to follow hook specifications so you must return output into "resprint". + +***** ChangeLog for 5.0.7 compared to 5.0.6 ***** +FIX: #7000 Dashboard link for late pending payment supplier invoices do not work +FIX: #7148 +FIX: #7325 Default VAT rate when editing template invoices is 0% +FIX: #7366 renaming table with pgsql +FIX: #7391 +FIX: #7510 Bug: extrafield content disappear when generate pdf within intervention +FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart +FIX: Bad link to unpayed suppliers invoices +FIX: bankentries search conciliated if val 0 +FIX: multicompany better accuracy in rounding and with revenue stamp. +FIX: PDF output was sharing 2 different currencies in same total +FIX: Upgrade missing on field +FIX: wrong key in selectarray +FIX: wrong personnal project time spent + ***** ChangeLog for 5.0.6 compared to 5.0.5 ***** FIX: Removed a bad symbolic link into custom directory. FIX: Renaming a resource ref rename also the directory of attached files. diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index 7696427b059..3819e2acccb 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -82,9 +82,12 @@ if ($action == 'add') $accountto=new Account($db); $accountto->fetch(GETPOST('account_to','int')); - if ($accountto->currency_code == $accountfrom->currency_code) { + if ($accountto->currency_code == $accountfrom->currency_code) + { $amountto=$amount; - } else { + } + else + { if (! $amountto) { $error++; diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index 1f47a94f6d2..ea5d6c3db26 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -56,7 +56,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') { if ($object->id) { - $urlfile = GETPOST('urlfile', 'alpha'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). + $urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). if (GETPOST('section', 'alpha')) $file = $upload_dir . "/" . $urlfile; // For a delete of GED module urlfile contains full path from upload_dir else // For documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile. { diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 0c133a85769..6fd7beb86bb 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1052,7 +1052,11 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable $file_name_osencoded=dol_osencode($file_name); // Check if destination dir is writable - // TODO + if (! is_writable(dirname($file_name_osencoded))) + { + dol_syslog("Files.lib::dol_move_uploaded_file Dir ".dirname($file_name_osencoded)." is not writable. Return 'ErrorDirNotWritable'", LOG_WARNING); + return 'ErrorDirNotWritable'; + } // Check if destination file already exists if (! $allowoverwrite) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index edf1cf0e721..7660b198313 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -270,10 +270,11 @@ function GETPOSTISSET($paramname) * 'custom'= custom filter specify $filter and $options) * @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get, 4 = post then get then cookie) * @param int $filter Filter to apply when $check is set to 'custom'. (See http://php.net/manual/en/filter.filters.php for détails) - * @param mixed $options Options to pass to filter_var when $check is set to 'custom'. + * @param mixed $options Options to pass to filter_var when $check is set to 'custom' + * @param string $noreplace Force disable of replacement of __xxx__ strings. * @return string|string[] Value found (string or array), or '' if check fails */ -function GETPOST($paramname, $check='alpha', $method=0, $filter=NULL, $options=NULL) +function GETPOST($paramname, $check='none', $method=0, $filter=NULL, $options=NULL, $noreplace=0) { global $mysoc,$user,$conf; @@ -467,7 +468,7 @@ function GETPOST($paramname, $check='alpha', $method=0, $filter=NULL, $options=N // Substitution variables for GETPOST (used to get final url with variable parameters or final default value with variable paramaters) // Example of variables: __DAY__, __MONTH__, __YEAR__, __MYCOUNTRYID__, __USERID__, __ENTITYID__, ... // We do this only if var is a GET. If it is a POST, may be we want to post the text with vars as the setup text. - if (! is_array($out) && empty($_POST[$paramname])) + if (! is_array($out) && empty($_POST[$paramname]) && empty($noreplace)) { $maxloop=20; $loopnb=0; // Protection against infinite loop while (preg_match('/__([A-Z0-9]+_?[A-Z0-9]+)__/i', $out, $reg) && ($loopnb < $maxloop)) // Detect '__ABCDEF__' as key 'ABCDEF' and '__ABC_DEF__' as key 'ABC_DEF'. Detection is also correct when 2 vars are side by side. diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 837f7f291e3..31cf38cfe9a 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -251,7 +251,7 @@ else if ($search_type != '' && $search_type != '-1') { - if ($search_type==1) + if ($search_type == 1) { $texte = $langs->trans("Services"); }