From e438bcb70a6f6be777ed61631a53638159b5b599 Mon Sep 17 00:00:00 2001 From: BB2A Anthony Berton Date: Thu, 9 Jun 2022 13:35:50 +0200 Subject: [PATCH 1/4] FIX - php V8 order card --- htdocs/comm/propal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index cc35cfc65a9..3613f052e8d 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -124,7 +124,7 @@ $usercancreateorder = $user->rights->commande->creer; $usercancreateinvoice = $user->rights->facture->creer; $usercancreatecontract = $user->rights->contrat->creer; $usercancreateintervention = $user->hasRight('ficheinter', 'creer'); -$usercancreatepurchaseorder = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); +$usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'creer') || $user->hasRight('supplier_order', 'creer')); $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php $permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php From 55afe1939d3398bcf9cfb72414e42945683c96f6 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 12 Jun 2022 21:33:08 +0200 Subject: [PATCH 2/4] Fix php8 compatibility --- .../restler/framework/Luracast/Restler/CommentParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php index 6b8b9178f6b..d49211ae80c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php @@ -420,7 +420,7 @@ class CommentParser $exception = $v1; array_shift($value); } - } elseif (count($value) && is_numeric($value[0])) { + } elseif (count($value) && isset($value[0]) && is_numeric($value[0])) { $code = $value[0]; array_shift($value); } From f2bade31887875734637e3bb4460ce67b7dbfae9 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 13 Jun 2022 19:57:11 +0200 Subject: [PATCH 3/4] Update dolibarr_changes.txt --- dev/dolibarr_changes.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index 204988c5442..cbfecbbc19f 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -275,6 +275,13 @@ RESTLER: with $loaders = array_unique(static::$rogueLoaders, SORT_REGULAR); + +* Replace CommentParser.php line 423 + elseif (count($value) && is_numeric($value[0])) + + with + + elseif (count($value) && isset($value[0]) && is_numeric($value[0])) +With swagger 2 provided into /explorer: From a757940f17bb5ee7e68f978653860fc3e8cb23a1 Mon Sep 17 00:00:00 2001 From: BB2A Anthony Berton Date: Tue, 14 Jun 2022 09:14:30 +0200 Subject: [PATCH 4/4] FIX - Right --- htdocs/comm/propal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 3613f052e8d..6fc19979f81 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -124,7 +124,7 @@ $usercancreateorder = $user->rights->commande->creer; $usercancreateinvoice = $user->rights->facture->creer; $usercancreatecontract = $user->rights->contrat->creer; $usercancreateintervention = $user->hasRight('ficheinter', 'creer'); -$usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'creer') || $user->hasRight('supplier_order', 'creer')); +$usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer')); $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php $permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php