From a7b593026b134ed0706541b9bd553d4636add04e Mon Sep 17 00:00:00 2001 From: marc Date: Fri, 22 Jul 2022 00:55:14 +0200 Subject: [PATCH 1/3] Fix #21449 --- htdocs/supplier_proposal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index ad35c8f9914..595be78d4df 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -302,7 +302,7 @@ $sql .= " p.rowid as project_id, p.ref as project_ref,"; if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " sc.fk_soc, sc.fk_user,"; } -$sql .= " u.firstname, u.lastname, u.photo, u.login, u.statut as status, u.admin, u.employee, u.email as uemail"; +$sql .= " u.firstname, u.lastname, u.photo, u.login, u.statut as statut, u.admin, u.employee, u.email as uemail"; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { From 5d75ea015b0d69c59899032aaccc3aa9dbce7a1b Mon Sep 17 00:00:00 2001 From: spooky360 Date: Fri, 22 Jul 2022 09:51:57 +0200 Subject: [PATCH 2/3] Added "$object" parameter to $formfile->showdocuments call Added "$object" parameter to $formfile->showdocuments call in order to use the $object reference on the showDocuments hook called inside showdocuments function. Otherwise, the hook is called with a null reference. --- htdocs/fourn/commande/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 35e5257fce0..d1e1dc85c9a 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2665,7 +2665,7 @@ if ($action == 'create') { $delallowed = $usercancreate; $modelpdf = (!empty($object->model_pdf) ? $object->model_pdf : (empty($conf->global->COMMANDE_SUPPLIER_ADDON_PDF) ? '' : $conf->global->COMMANDE_SUPPLIER_ADDON_PDF)); - print $formfile->showdocuments('commande_fournisseur', $objref, $filedir, $urlsource, $genallowed, $delallowed, $modelpdf, 1, 0, 0, 0, 0, '', '', '', $object->thirdparty->default_lang); + print $formfile->showdocuments('commande_fournisseur', $objref, $filedir, $urlsource, $genallowed, $delallowed, $modelpdf, 1, 0, 0, 0, 0, '', '', '', $object->thirdparty->default_lang, '', $object); $somethingshown = $formfile->numoffiles; // Show links to link elements From 9463f24a73dd9af2808eb80daace75c97f48bfea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 11:35:56 +0200 Subject: [PATCH 3/3] Better fix --- htdocs/supplier_proposal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 595be78d4df..8f7094ee486 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -302,7 +302,7 @@ $sql .= " p.rowid as project_id, p.ref as project_ref,"; if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " sc.fk_soc, sc.fk_user,"; } -$sql .= " u.firstname, u.lastname, u.photo, u.login, u.statut as statut, u.admin, u.employee, u.email as uemail"; +$sql .= " u.firstname, u.lastname, u.photo, u.login, u.statut as ustatus, u.admin, u.employee, u.email as uemail"; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {