From 41f0920656a8eb26ee40f48a21cbed9362897d73 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Oct 2014 23:50:10 +0200 Subject: [PATCH 1/3] Fix for debian --- build/debian/control | 8 +++++--- build/debian/copyright | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build/debian/control b/build/debian/control index fc0cee30319..164b919e066 100755 --- a/build/debian/control +++ b/build/debian/control @@ -3,7 +3,7 @@ Section: web Priority: optional Maintainer: Laurent Destailleur (eldy) # Uploaders: Laurent Destailleur (eldy) # Only if differs from Maintainer -Standards-Version: 3.9.4 +Standards-Version: 3.9.6 Homepage: http://www.dolibarr.org Build-Depends: debhelper (>= 9), po-debconf # This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version @@ -16,7 +16,8 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap, php5-geoip, # Required PHP libraries php-pear, php-mail-mime, -# php-tcpdf, libfpdi-php, libfpdf-tpl-php, php-fpdf, +# php-tcpdf, libfpdi-php, +# libfpdf-tpl-php, php-fpdf, # libphp-adodb, # libnusoap-php, # libphp-pclzip, @@ -26,9 +27,10 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | # fonts-dejavu-core | ttf-dejavu-core, xdg-utils, mysql-server, + mysql-client, ${misc:Depends}, ${perl:Depends} -Recommends: mysql-client, apache2 | lighttpd | httpd +Recommends: apache2 | lighttpd | httpd Suggests: www-browser Description: Web based software to manage a company or foundation Dolibarr ERP & CRM is an easy to use open source/free software for small diff --git a/build/debian/copyright b/build/debian/copyright index 73109152034..080965c31a3 100644 --- a/build/debian/copyright +++ b/build/debian/copyright @@ -1,7 +1,7 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Dolibarr Upstream-Contact: Laurent Destailleur -Source: http://sourceforge.net/projects/dolibarr/files/ +Source: http://www.dolibarr.org/files/stable/standard/ Files: * Copyright: 2002-2009, Rodolphe Quiedeville From badf3794894bc81f3873fd53ec5f42b4e2751b56 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Oct 2014 01:56:06 +0100 Subject: [PATCH 2/3] Fix: [ bug #1618 ] PHP Error thrown when saving a barcode --- ChangeLog | 1 + htdocs/product/fiche.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a1ec979f287..c2ad4b7ecf1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ English Dolibarr ChangeLog - Fix: box of customer and propsects were not correctly disabled. - Fix: right and error management #1961 - Fix: Fix Error when trying to clone an Order #1943 +- Fix: [ bug #1618 ] PHP Error thrown when saving a barcode ***** ChangeLog for 3.6.1 compared to 3.6.* ***** For users: diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 7e5b9b76c78..5498233e5b8 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -124,7 +124,7 @@ if (empty($reshook)) // Barcode value if ($action == 'setbarcode' && $createbarcode) { - $result=$object->check_barcode(GETPOST('barcode'),GETPOT('barcode_type_code')); + $result=$object->check_barcode(GETPOST('barcode'),GETPOST('barcode_type_code')); if ($result >= 0) { From 106b4a669f203f2791ff1a607ca691d298e4b43d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 30 Oct 2014 11:15:13 +0100 Subject: [PATCH 3/3] id_parent and id_children was not set. So introduce new method to return same with no risk to break current working code to address this. --- htdocs/user/class/user.class.php | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 6f59ac5eadf..afb53bb5a5e 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2220,8 +2220,6 @@ class User extends CommonObject * Reconstruit l'arborescence hierarchique des users sous la forme d'un tableau * Renvoi un tableau de tableau('id','id_parent',...) trie selon arbre et avec: * id = id du user - * id_parent = id du user parent - * id_children = tableau des id enfant * name = nom du user * fullname = nom avec chemin complet du user * fullpath = chemin complet compose des id @@ -2306,6 +2304,29 @@ class User extends CommonObject return $this->users; } + /** + * Return list of all childs users in herarchy. + * + * @return array Array of user id lower than user. This overwrite this->users. + */ + function getAllChildIds() + { + // Init this->users + $this->get_full_tree(); + + $idtoscan=$this->id; + $childids=array(); + + dol_syslog("Build childid for id = ".$idtoscan); + foreach($this->users as $id => $val) + { + //var_dump($val['fullpath']); + if (preg_match('/_'.$idtoscan.'_/', $val['fullpath'])) $childids[$val['id']]=$val['id']; + } + + return $childids; + } + /** * For user id_user and its childs available in this->users, define property fullpath and fullname *