From 20c8d47d6abd1a2bb42fb8c774a30b10a8ac7d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 24 Apr 2023 20:11:02 +0200 Subject: [PATCH 1/3] Fiw warnings --- htdocs/core/lib/security.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 0d283ea623d..55a516377b2 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -336,7 +336,7 @@ function dolGetLdapPasswordHash($password, $type = 'md5') * @param string $features Features to check (it must be module name or $object->element. Can be a 'or' check with 'levela|levelb'. * Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...) * This is used to check permission $user->rights->features->... - * @param int|string|object $object Object or Object ID or list of Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional). + * @param int|string|Object $object Object or Object ID or list of Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional). * @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany module. Param not used if objectid is null (optional). * @param string $feature2 Feature to check, second level of permission (optional). Can be a 'or' check with 'sublevela|sublevelb'. * This is used to check permission $user->rights->features->feature2... @@ -401,11 +401,11 @@ function restrictedArea(User $user, $features, $object = 0, $tableandshare = '', if ($features == 'productbatch') { $features = 'produit'; } - if ($features == 'fournisseur') { // When vendor invoice and pruchase order are into module 'fournisseur' + if ($features == 'fournisseur') { // When vendor invoice and purchase order are into module 'fournisseur' $features = 'fournisseur'; - if ($object->element == 'invoice_supplier') { + if (is_object($object) && $object->element == 'invoice_supplier') { $feature2 = 'facture'; - } elseif ($object->element == 'order_supplier') { + } elseif (is_object($object) && $object->element == 'order_supplier') { $feature2 = 'commande'; } } From 60b308b394192f013470475f9be10e296ae4d1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 24 Apr 2023 20:24:34 +0200 Subject: [PATCH 2/3] Doc --- htdocs/compta/facture/class/facture.class.php | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 693d2a73480..0368882885b 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -114,22 +114,42 @@ class Facture extends CommonInvoice public $author; + /** + * @var int ID + * @deprecated + * @see $fk_user_author + */ + public $user_author; + /** * @var int ID */ public $fk_user_author; + /** + * @var int ID + * @deprecated + * @see $fk_user_valid + */ + public $user_valid; + /** * @var int ID */ public $fk_user_valid; + /** + * @var int ID + * @deprecated + * @see $fk_uesr_modif + */ + public $user_modification; + /** * @var int ID */ public $fk_user_modif; - public $date; // Date invoice public $datem; From 6f351d5481e2221917eec54dc38faad24a947df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Apr 2023 09:46:12 +0200 Subject: [PATCH 3/3] load translation for tooltip translation was not loaded when using ajax tooltip --- htdocs/commande/class/commande.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index f707714d772..705e0608888 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3727,6 +3727,7 @@ class Commande extends CommonOrder { global $conf, $langs, $user; + $langs->load('orders'); $datas = []; $nofetch = !empty($params['nofetch']);