From 3bb1756a13c75de13643a475c5031bc60a3dc778 Mon Sep 17 00:00:00 2001 From: KiteAtao Date: Sat, 7 Jan 2017 21:37:45 +0100 Subject: [PATCH 01/16] Fix Contact Api for REST WebServices --- htdocs/societe/class/api_contact.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/api_contact.class.php b/htdocs/societe/class/api_contact.class.php index 884653e044d..211792a2628 100644 --- a/htdocs/societe/class/api_contact.class.php +++ b/htdocs/societe/class/api_contact.class.php @@ -17,7 +17,7 @@ use Luracast\Restler\RestException; -//require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; /** * API class for contact object From 5c76229cdf0c296cca52c375deeae3779be21a0b Mon Sep 17 00:00:00 2001 From: KiteAtao Date: Sat, 7 Jan 2017 21:46:49 +0100 Subject: [PATCH 02/16] Fix Commands Api for REST WebServices --- htdocs/commande/class/api_commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/api_commande.class.php b/htdocs/commande/class/api_commande.class.php index 3a029bc0d00..45ef2d4b4f2 100644 --- a/htdocs/commande/class/api_commande.class.php +++ b/htdocs/commande/class/api_commande.class.php @@ -193,7 +193,7 @@ class CommandeApi extends DolibarrApi * @return array Array of order objects */ function getListForSoc($socid = 0) { - return getList(0,"s.rowid","ASC",0,0,$socid); + return $this->getList(0,"s.rowid","ASC",0,0,$socid); } From dc605c915aa73adad5876f2d404836eec40856cd Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 8 Jan 2017 07:46:30 +0100 Subject: [PATCH 03/16] Fix : Bank - Missing language file --- htdocs/compta/bank/bankentries.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php index 47405d0e748..5cae7aff723 100644 --- a/htdocs/compta/bank/bankentries.php +++ b/htdocs/compta/bank/bankentries.php @@ -54,6 +54,7 @@ $langs->load("loan"); $langs->load("donations"); $langs->load("trips"); $langs->load("members"); +$langs->load("compta"); $id = GETPOST('id','int'); $ref = GETPOST('ref','alpha'); From a583fd7a3b43a2d95717dded0b1ee79135a09e7a Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 8 Jan 2017 20:52:42 +0100 Subject: [PATCH 04/16] Fix : Bank - Presentation, no titlefield in a list --- htdocs/compta/bank/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php index 5e3f81bb205..82283547d99 100644 --- a/htdocs/compta/bank/index.php +++ b/htdocs/compta/bank/index.php @@ -449,7 +449,7 @@ foreach ($accounts as $key=>$type) // Ref if (! empty($arrayfields['b.ref']['checked'])) { - print ''.$acc->getNomUrl(1).''; + print ''.$acc->getNomUrl(1).''; if (! $i) $totalarray['nbfield']++; } From 70e6c2d41fbdcba739635b046cee7c53081e7351 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Jan 2017 00:42:28 +0100 Subject: [PATCH 05/16] Fix bad count of nb of contacts in statistics --- htdocs/contact/class/contact.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 67039fb2bef..d785a58597f 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -130,6 +130,7 @@ class Contact extends CommonObject $clause = "AND"; } $sql.= ' '.$clause.' sp.entity IN ('.getEntity($this->element, 1).')'; + $sql.= " AND (sp.priv='0' OR (sp.priv='1' AND sp.fk_user_creat=".$user->id."))"; if ($user->societe_id > 0) $sql.=" AND sp.fk_soc = ".$user->societe_id; $resql=$this->db->query($sql); From 1559c45a61afe687136e28909b6a52364d244dea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Jan 2017 09:24:55 +0100 Subject: [PATCH 06/16] FIX link for not found photo when using gravatar. Must use external url --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f8fd30b15e3..3f8ed836f44 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5812,7 +5812,7 @@ class Form */ global $dolibarr_main_url_root; $ret.=''; - $ret.='Gravatar avatar'; // gravatar need md5 hash + $ret.='Gravatar avatar'; // gravatar need md5 hash } else { From cb7cd3baaf05427529ff525ddd770e14fcdf69ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Jan 2017 10:23:50 +0100 Subject: [PATCH 07/16] Use mariadb as default to be debian compliant with https://wiki.debian.org/Teams/MySQL/virtual-mysql-server --- build/debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/debian/control b/build/debian/control index 37689ef9bcc..75ffb43b2c0 100755 --- a/build/debian/control +++ b/build/debian/control @@ -26,11 +26,11 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | # Misc dependencies # fonts-dejavu-core | ttf-dejavu-core, xdg-utils, - virtual-mysql-client, + mariadb-client | virtual-mysql-client, ${misc:Depends}, ${perl:Depends} Recommends: apache2 | lighttpd | httpd, - virtual-mysql-server + mariadb-server | virtual-mysql-server Suggests: www-browser, php5-geoip Description: Web based software to manage a company or foundation Dolibarr ERP & CRM is an easy to use open source/free software package for From 2c2bb366bd9e7b6bb955cd1a975dc1b0dd880d7a Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Wed, 11 Jan 2017 09:19:07 +0100 Subject: [PATCH 08/16] fix : warehouse creation failed with mysql 5.7 (string 'NULL' instead of "NULL") --- htdocs/product/stock/class/entrepot.class.php | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index a9057ca34ba..1b650a4e7bb 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -36,21 +36,21 @@ class Entrepot extends CommonObject public $element='stock'; public $table_element='entrepot'; public $picto='stock'; - + /** * Warehouse closed, inactive */ const STATUS_CLOSED = 0; - + /** * Warehouse open and operations for customer shipping, supplier dispatch, internal stock transfers/corrections allowed. */ const STATUS_OPEN_ALL = 1; - + /** * Warehouse open and operations for stock transfers/corrections allowed (not for customer shipping and supplier dispatch). */ - const STATUS_OPEN_INTERNAL = 2; + const STATUS_OPEN_INTERNAL = 2; var $libelle; var $description; @@ -61,10 +61,10 @@ class Entrepot extends CommonObject var $zip; var $town; var $fk_parent; - + // List of short language codes for status var $statuts = array(); - + /** * Constructor * @@ -85,7 +85,7 @@ class Entrepot extends CommonObject { $this->statuts[self::STATUS_OPEN_ALL] = 'Opened'; } - + } /** @@ -97,9 +97,9 @@ class Entrepot extends CommonObject function create($user) { global $conf; - + $this->libelle = trim($this->libelle); - + // Si libelle non defini, erreur if ($this->libelle == '') { @@ -112,7 +112,7 @@ class Entrepot extends CommonObject $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."entrepot (entity, datec, fk_user_author, label, fk_parent)"; - $sql .= " VALUES (".$conf->entity.",'".$this->db->idate($now)."',".$user->id.",'".$this->db->escape($this->libelle)."', ".($this->fk_parent > 0 ? $this->fk_parent : 'NULL').")"; + $sql .= " VALUES (".$conf->entity.",'".$this->db->idate($now)."',".$user->id.",'".$this->db->escape($this->libelle)."', ".($this->fk_parent > 0 ? $this->fk_parent : "NULL").")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); $result=$this->db->query($sql); @@ -161,19 +161,19 @@ class Entrepot extends CommonObject function update($id, $user) { if (empty($id)) $id = $this->id; - + // Check if new parent is already a child of current warehouse - if(!empty($this->fk_parent)) + if(!empty($this->fk_parent)) { $TChildWarehouses = array($id); $TChildWarehouses = $this->get_children_warehouses($this->id, $TChildWarehouses); - if(in_array($this->fk_parent, $TChildWarehouses)) + if(in_array($this->fk_parent, $TChildWarehouses)) { $this->error = 'ErrorCannotAddThisParentWarehouse'; return -2; } } - + $this->libelle=trim($this->libelle); $this->description=trim($this->description); @@ -186,7 +186,7 @@ class Entrepot extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."entrepot "; $sql .= " SET label = '" . $this->db->escape($this->libelle) ."'"; - $sql .= ", fk_parent = " . (($this->fk_parent > 0) ? $this->fk_parent : 'NULL'); + $sql .= ", fk_parent = " . (($this->fk_parent > 0) ? $this->fk_parent : "NULL"); $sql .= ", description = '" . $this->db->escape($this->description) ."'"; $sql .= ", statut = " . $this->statut; $sql .= ", lieu = '" . $this->db->escape($this->lieu) ."'"; @@ -232,7 +232,7 @@ class Entrepot extends CommonObject if ($result < 0) { $error++; } // End call triggers } - + $elements = array('stock_mouvement','product_stock','product_warehouse_properties'); foreach($elements as $table) { @@ -516,12 +516,12 @@ class Entrepot extends CommonObject function LibStatut($statut,$mode=0) { global $langs; - + $langs->load('stocks'); - + $picto = 'statut5'; $label = $langs->trans($this->statuts[$statut]); - + if ($mode == 0) { @@ -569,10 +569,10 @@ class Entrepot extends CommonObject $langs->load("stocks"); if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips - + $result=''; $label = ''; - + $label = '' . $langs->trans("ShowWarehouse").''; $label.= '
' . $langs->trans('Ref') . ': ' . (empty($this->label)?$this->libelle:$this->label); if (! empty($this->lieu)) @@ -591,11 +591,11 @@ class Entrepot extends CommonObject $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.=' class="classfortooltip"'; } - + $linkstart = ''; $linkend=''; - + if ($withpicto) $result.=($link.img_object(($notooltip?'':$label), 'stock', ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend.' '); $result.=$linkstart.($showfullpath ? $this->get_full_arbo() : (empty($this->label)?$this->libelle:$this->label)).$linkend; return $result; @@ -628,60 +628,60 @@ class Entrepot extends CommonObject $this->country_id=1; $this->country_code='FR'; } - + /** * Return full path to current warehouse * - * @return string String full path to current warehouse separated by " >> " + * @return string String full path to current warehouse separated by " >> " */ - function get_full_arbo() + function get_full_arbo() { global $user,$langs,$conf; - + $TArbo = array(empty($this->label)?$this->libelle:$this->label); - + $protection=100; // We limit depth of warehouses to 100 - + $warehousetmp = new Entrepot($this->db); - - $parentid = $this->fk_parent; // If parent_id not defined on current object, we do not start consecutive searches of parents + + $parentid = $this->fk_parent; // If parent_id not defined on current object, we do not start consecutive searches of parents $i=0; - while ($parentid > 0 && $i < $protection) + while ($parentid > 0 && $i < $protection) { $sql = 'SELECT fk_parent FROM '.MAIN_DB_PREFIX.'entrepot WHERE rowid = '.$parentid; $resql = $this->db->query($sql); - if ($resql) + if ($resql) { $objarbo = $this->db->fetch_object($resql); if ($objarbo) { $warehousetmp->fetch($parentid); $TArbo[] = $warehousetmp->label; - $parentid = $objarbo->fk_parent; + $parentid = $objarbo->fk_parent; } else break; } else dol_print_error($this->db); - + $i++; } - + return implode(' >> ', array_reverse($TArbo)); } - + /** * Return array of children warehouses ids from $id warehouse (recursive function) - * + * * @param int $id id parent warehouse * @param array() $TChildWarehouses array which will contain all children (param by reference) * @return array() $TChildWarehouses array which will contain all children */ function get_children_warehouses($id, &$TChildWarehouses) { - + $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'entrepot WHERE fk_parent = '.$id; - + $resql = $this->db->query($sql); if($resql) { while($res = $this->db->fetch_object($resql)) { @@ -689,9 +689,9 @@ class Entrepot extends CommonObject $this->get_children_warehouses($res->rowid, $TChildWarehouses); } } - + return $TChildWarehouses; - + } } From 5553be4aa9150bd7c9b9c7e105baeff5a28f474e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Jan 2017 16:08:04 +0100 Subject: [PATCH 09/16] Fix code comment --- htdocs/core/class/commonobject.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 5e83f59ea36..fd15bdd5886 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2445,9 +2445,10 @@ abstract class CommonObject * Fetch array of objects linked to current object. Links are loaded into this->linkedObjects array and this->linkedObjectsIds * Possible usage for parameters: * - all parameters empty -> we look all link to current object (current object can be source or target) - * - one couple id+type is provided -> this will set $justsource or $justtarget - * - one couple id+type is provided and other type is provided -> this will set $justsource or $justtarget + criteria on other type - * + * - source id+type -> will get target list linked to source + * - target id+type -> will get source list linked to target + * - source id+type + target type -> will get target list of the type + * - target id+type + target source -> will get source list of the type * * @param int $sourceid Object source id (if not defined, id of object) * @param string $sourcetype Object source type (if not defined, element name of object) From 5898d27609b78c3f31182cc68a6ad46a9464c506 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 11 Jan 2017 16:47:17 +0100 Subject: [PATCH 10/16] Fix: avoid errors if constants values not exists --- htdocs/core/class/CMailFile.class.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 52cce35f0d2..6b42ba73381 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -153,7 +153,7 @@ class CMailFile } if (! empty($conf->global->MAIN_MAIL_FORCE_CONTENT_TYPE_TO_HTML)) $this->msgishtml=1; // To force to send everything with content type html. - + // Detect images if ($this->msgishtml) { @@ -210,7 +210,7 @@ class CMailFile $this->trackid = $trackid; $smtp_headers = $this->write_smtpheaders(); if (! empty($moreinheader)) $smtp_headers.=$moreinheader; - + // Define mime_headers $mime_headers = $this->write_mimeheaders($filename_list, $mimefilename_list); @@ -270,7 +270,7 @@ class CMailFile $smtps->setFrom($this->getValidAddress($from,0,1)); $smtps->setTrackId($trackid); $smtps->setReplyTo($this->getValidAddress($from,0,1)); // Set property with this->smtps->setReplyTo after constructor if you want to use another value than the From - + if (! empty($this->html)) { if (!empty($css)) @@ -473,16 +473,16 @@ class CMailFile 'maildao' )); $reshook = $hookmanager->executeHooks('doactions', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (! empty($reshook)) + if (! empty($reshook)) { $this->error = "Error in hook maildao doactions " . $reshook; dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_ERR); - + return $reshook; } // Check number of recipient is lower or equal than MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL - if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL=10; + if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL=6; $tmparray1 = explode(',', $this->addr_to); if (count($tmparray1) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL) { @@ -490,6 +490,7 @@ class CMailFile dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } + if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL=2; $tmparray2 = explode(',', $this->addr_cc); if (count($tmparray2) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL) { @@ -497,6 +498,7 @@ class CMailFile dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } + if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL=2; $tmparray3 = explode(',', $this->addr_bcc); if (count($tmparray3) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL) { @@ -504,14 +506,14 @@ class CMailFile dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } + if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL=10; if ((count($tmparray1)+count($tmparray2)+count($tmparray3)) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL) { $this->error = 'Too much recipients in to:, cc:, bcc:'; dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } - - + // Action according to choosed sending method if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') { @@ -553,7 +555,7 @@ class CMailFile $bounce .= ($bounce?' ':'').'-ba'; } dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port').", additionnal_parameters=".$bounce, LOG_DEBUG); - + $this->message=stripslashes($this->message); if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail(); @@ -873,7 +875,7 @@ class CMailFile // Receiver if (isset($this->addr_cc) && $this->addr_cc) $out.= "Cc: ".$this->getValidAddress($this->addr_cc,2).$this->eol2; - if (isset($this->addr_bcc) && $this->addr_bcc) $out.= "Bcc: ".$this->getValidAddress($this->addr_bcc,2).$this->eol2; // Question: bcc must not be into header, only into SMTP command "RCPT TO". Does php mail support this ? + if (isset($this->addr_bcc) && $this->addr_bcc) $out.= "Bcc: ".$this->getValidAddress($this->addr_bcc,2).$this->eol2; // Question: bcc must not be into header, only into SMTP command "RCPT TO". Does php mail support this ? // Delivery receipt if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) $out.= "Disposition-Notification-To: ".$this->getValidAddress($this->addr_from,2).$this->eol2; From 94f14f529bd0b33c773b23d84ba04a5aa77962a9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Jan 2017 22:02:08 +0100 Subject: [PATCH 11/16] Fix pb with double quote --- dev/initdemo/initdemo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/initdemo/initdemo.sh b/dev/initdemo/initdemo.sh index 497d3abbf50..c34d9e2ffda 100755 --- a/dev/initdemo/initdemo.sh +++ b/dev/initdemo/initdemo.sh @@ -162,7 +162,7 @@ export res=$? # ---------------------------- copy demo files -export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" ` +export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' ` if [ "x$documentdir" != "x" ] then echo cp -pr $mydir/documents_demo/* "$documentdir/" @@ -174,7 +174,7 @@ then echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images" cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images" else - echo Detection of documents directory failed so demo files were not copied. + echo Detection of documents directory $documentdir failed so demo files were not copied. fi From 749f8cf252dd05a21f761f6b364db6a3aa8c88d3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Jan 2017 00:15:00 +0100 Subject: [PATCH 12/16] Fix translation --- htdocs/install/inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 0a6c76fa786..840fa709ddf 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -191,7 +191,7 @@ if (constant('DOL_DATA_ROOT') === null) { } if (@file_exists($lockfile)) { - print 'Install pages have been disabled for security reason (by lock file install.lock into dolibarr root directory).
'; + print 'Install pages have been disabled for security reason (by lock file install.lock into dolibarr documents directory).
'; if (! empty($dolibarr_main_url_root)) { print 'Click on following link. '; From 3d8c5b377b83fb84e5cf6200ec0d651b4782760a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Jan 2017 10:16:19 +0100 Subject: [PATCH 13/16] Fix string not translated --- htdocs/core/tpl/login.tpl.php | 2 +- htdocs/langs/en_US/main.lang | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 5e79b71ee34..77422d317e5 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -89,7 +89,7 @@ $(document).ready(function () {
- +
">
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 1cc51fa7037..61356f0afd7 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -447,6 +447,7 @@ DeletePicture=Picture delete ConfirmDeletePicture=Confirm picture deletion? Login=Login CurrentLogin=Current login +EnterLoginDetail=Enter login details January=January February=February March=March From 5e71ff816f2a2eafac7cad687280ffe10a536b9c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Jan 2017 10:51:31 +0100 Subject: [PATCH 14/16] Increase limit for better backward compatibility without loosing minimum security. --- htdocs/core/class/CMailFile.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 6b42ba73381..26f8a4b88f2 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -482,7 +482,7 @@ class CMailFile } // Check number of recipient is lower or equal than MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL - if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL=6; + if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL=10; $tmparray1 = explode(',', $this->addr_to); if (count($tmparray1) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL) { @@ -490,7 +490,7 @@ class CMailFile dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } - if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL=2; + if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL=10; $tmparray2 = explode(',', $this->addr_cc); if (count($tmparray2) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL) { @@ -498,7 +498,7 @@ class CMailFile dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } - if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL=2; + if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL=10; $tmparray3 = explode(',', $this->addr_bcc); if (count($tmparray3) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL) { From e802ff33857229dca5a1c72e356c357d9e51a047 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Jan 2017 10:57:15 +0100 Subject: [PATCH 15/16] Fix POO declaration --- htdocs/societe/class/companybankaccount.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 68749713788..e5d5eb5cc8f 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -64,9 +64,10 @@ class CompanyBankAccount extends Account * Create bank information record * * @param User $user User + * @param int $notrigger 1=Disable triggers * @return int <0 if KO, >= 0 if OK */ - function create(User $user = null) + function create(User $user = null, $notrigger=0) { $now=dol_now(); From 7476a3c8ae3579726633b7591e3c6859ef5deb15 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Jan 2017 10:59:27 +0100 Subject: [PATCH 16/16] Fix error during migration --- htdocs/core/modules/modDeplacement.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/modDeplacement.class.php b/htdocs/core/modules/modDeplacement.class.php index ab4e7a0095f..9563e11aaa2 100644 --- a/htdocs/core/modules/modDeplacement.class.php +++ b/htdocs/core/modules/modDeplacement.class.php @@ -135,10 +135,13 @@ class modDeplacement extends DolibarrModules $this->export_sql_end[$r] .=' AND d.entity IN ('.getEntity('deplacement',1).')'; if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' AND (sc.fk_user = '.(empty($user)?0:$user->id).' OR d.fk_soc IS NULL)'; - $childids = $user->getAllChildIds(); - $childids[]=$user->id; - - if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',',$childids).')'; + if (! empty($user)) // Not defined during migration process + { + $childids = $user->getAllChildIds(); + $childids[]=$user->id; + + if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',',$childids).')'; + } }