From ff6bcbdcf883f96a6e5f1da0b5236bf4c2f0011c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 3 Feb 2020 03:01:23 +0100 Subject: [PATCH 1/5] Fix trans --- htdocs/core/modules/modLabel.class.php | 2 +- htdocs/langs/en_US/admin.lang | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modLabel.class.php b/htdocs/core/modules/modLabel.class.php index c387ed69e6e..c6f2c5267b5 100644 --- a/htdocs/core/modules/modLabel.class.php +++ b/htdocs/core/modules/modLabel.class.php @@ -47,7 +47,7 @@ class modLabel extends DolibarrModules $this->module_position = '75'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); - $this->description = "Gestion des etiquettes"; + $this->description = "Management of stickers"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'development'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5cac95078c0..0bf914d0e22 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -545,6 +545,8 @@ Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u Module59Desc=Add function to generate Bookmark4u account from a Dolibarr account +Module60Name=Stickers +Module60Desc=Management of stickers Module70Name=Interventions Module70Desc=Intervention management Module75Name=Expense and trip notes From ccf8e81f93779264198ae6cd5857eb16b52012b6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 3 Feb 2020 03:08:54 +0100 Subject: [PATCH 2/5] FIX #12975 --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 ++ htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 64aa3c52e25..fa661610d3b 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -903,6 +903,8 @@ class pdf_crabe extends ModelePDFFactures $i++; } + + return $tab3_top + $y + 3; } else { diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 3e00e2cab68..2911cf5d5bc 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -1021,6 +1021,8 @@ class pdf_sponge extends ModelePDFFactures $i++; } + + return $tab3_top + $y + 3; } else { From 5633f584770ca81de3f82d3739050006cf1a4063 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 3 Feb 2020 03:25:41 +0100 Subject: [PATCH 3/5] FIX #12978 --- htdocs/core/modules/modStock.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index 6b2dc11605c..bc1971ee3ed 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -348,6 +348,7 @@ class modStock extends DolibarrModules $this->import_examplevalues_array[$r]=array( 'ps.fk_product'=>"PREF123456",'ps.fk_entrepot'=>"ALM001",'ps.reel'=>"10" ); + $this->import_updatekeys_array[$r]=array('ps.fk_product'=>'Product', 'ps.fk_entrepot'=>"Warehouse"); $this->import_run_sql_after_array[$r]=array( // Because we may change data that are denormalized, we must update dernormalized data after. 'UPDATE '.MAIN_DB_PREFIX.'product p SET p.stock= (SELECT SUM(ps.reel) FROM '.MAIN_DB_PREFIX.'product_stock ps WHERE ps.fk_product = p.rowid);' ); From a30da7860f2cfc4afecd606668fb838886669ee7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 3 Feb 2020 03:32:31 +0100 Subject: [PATCH 4/5] FIX #12892 --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 15200582ced..e0c63ca0a8f 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3889,7 +3889,7 @@ elseif ($id > 0 || !empty($ref)) } // Call Hook formConfirm - $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid, 'remainingtopay' => &$resteapayer); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; From b3a50bd4b0e701bb68bd2ed6654f061bae344c91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 3 Feb 2020 03:47:45 +0100 Subject: [PATCH 5/5] FIX #12874 --- htdocs/user/class/api_users.class.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index be768a3e15a..fa139e2c69f 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -132,15 +132,15 @@ class Users extends DolibarrApi /** * Get properties of an user object - * * Return an array with user informations * - * @param int $id ID of user + * @param int $id ID of user + * @param int $includepermissions Set this to 1 to have the array of permissions loaded (not done by default for performance purpose) * @return array|mixed data without useless information * * @throws RestException */ - public function get($id) + public function get($id, $includepermissions = 0) { //if (!DolibarrApiAccess::$user->rights->user->user->lire) { //throw new RestException(401); @@ -157,6 +157,10 @@ class Users extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + if ($includepermissions) { + $this->useraccount->getRights(); + } + return $this->_cleanObjectDatas($this->useraccount); } @@ -544,6 +548,12 @@ class Users extends DolibarrApi unset($object->clicktodial_password); unset($object->openid); + unset($object->lines); + unset($object->modelpdf); + unset($object->skype); + unset($object->twitter); + unset($object->facebook); + unset($object->linkedin); $canreadsalary = ((!empty($conf->salaries->enabled) && !empty(DolibarrApiAccess::$user->rights->salaries->read)) || (!empty($conf->hrm->enabled) && !empty(DolibarrApiAccess::$user->rights->hrm->employee->read)));