diff --git a/ChangeLog b/ChangeLog index 40ad4d41945..1d5dc78636c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -212,6 +212,7 @@ Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: [ bug #1526 ] Thumbs of files uploaded with dots in their names do not load correctly Fix: Import ProfId1 to siren and ProfId2 to siret ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index ffd60227596..6aaa712f644 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -333,10 +333,10 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Wed Jun 20 2014 Laurent Destailleur 3.5.4-0.3 +* Wed Jul 2 2014 Laurent Destailleur 3.6.0-0.2.b - Upstream release -* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index 0a99f8180ac..7c8304cd56b 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -569,10 +569,10 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Wed Jun 20 2014 Laurent Destailleur 3.5.4-0.3 +* Wed Jul 2 2014 Laurent Destailleur 3.6.0-0.2.b - Upstream release -* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 3242d59a3da..707371aed15 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -338,10 +338,10 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Wed Jun 20 2014 Laurent Destailleur 3.5.4-0.3 +* Wed Jul 2 2014 Laurent Destailleur 3.6.0-0.2.b - Upstream release -* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 2781f9b8dbf..417756b486f 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -349,10 +349,10 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Wed Jun 20 2014 Laurent Destailleur 3.5.4-0.3 +* Wed Jul 2 2014 Laurent Destailleur 3.6.0-0.2.b - Upstream release -* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 0036aa430f1..bdb96718dfa 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -285,7 +285,7 @@ if (($action == 'create' || $action == 'add') && empty($mesgs)) 'HT', 0, $product_type, - $lines[$i]->rang, + $ii, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid, diff --git a/htdocs/core/class/cookie.class.php b/htdocs/core/class/cookie.class.php index 0797be330bf..bcca9fcfa73 100644 --- a/htdocs/core/class/cookie.class.php +++ b/htdocs/core/class/cookie.class.php @@ -91,7 +91,9 @@ class DolCookie $num = (count($this->cookiearray) - 2); for ($f = 0; $f <= $num; $f++) { - $this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey)); + if (!empty($this->myKey)) { + $this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey)); + } } return(base64_decode($this->myValue)); diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index dc4a74cb525..6e764941d31 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -4,6 +4,7 @@ * Copyright (c) 2010 Juanjo Menent * Copyright (c) 2013 Charles-Fr BENKE * Copyright (C) 2013 Cédric Salvador + * Copyright (c) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -801,10 +802,9 @@ class FormFile // Preview if (empty($useinecm)) { + $fileinfo = pathinfo($file['name']); print ''; - $tmp=explode('.',$file['name']); - if (count($tmp) == 3) $minifile=$tmp[0].'_mini.'.$tmp[1].'.'.strtolower($tmp[2]); // Thumbs are created with filename in lower case - else $minifile=$tmp[0].'_mini.'.strtolower($tmp[1]); // Thumbs are created with filename in lower case + $minifile=$fileinfo['filename'].'_mini.'.strtolower($fileinfo['extension']); // Thumbs are created with filename in lower case if (image_format_supported($file['name']) > 0) print ''; else print ' '; print ''; diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index a86702fffbe..a1f9178e48f 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -165,9 +165,10 @@ class FormProjets * Build Select List of element associable to a project * * @param string $table_element Table of the element to update + * @param int $socid socid to filter * @return string The HTML select list of element */ - function select_element($table_element) + function select_element($table_element,$socid=0) { global $conf; @@ -194,8 +195,8 @@ class FormProjets $sql.= " FROM ".MAIN_DB_PREFIX.$table_element; $sql.= " WHERE ".$projectkey." is null"; - if (!empty($this->societe->id)) { - $sql.= " AND fk_soc=".$this->societe->id; + if (!empty($socid)) { + $sql.= " AND fk_soc=".$socid; } $sql.= ' AND entity='.getEntity('project'); $sql.= " ORDER BY ref DESC"; @@ -229,4 +230,4 @@ class FormProjets } -} \ No newline at end of file +} diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 6edaec7b35a..9d09c7c25c6 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -229,13 +229,11 @@ foreach ($listofreferent as $key => $value) print_titre($langs->trans($title)); - $selectList=$formproject->select_element($tablename); - if ($selectList<0) { + $selectList=$formproject->select_element($tablename,$project->societe->id); + + if (!$selectList || ($selectList<0)) { setEventMessage($formproject->error,'errors'); - } - - if ($selectList) - { + } else { print '
'; print ''; print '';