From 6abeb2804eefa77cc9b1bce8ebad1534c147147e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Mar 2022 11:47:12 +0100 Subject: [PATCH 1/4] Fix phpcs --- htdocs/comm/propal/list.php | 1 - htdocs/projet/card.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index ae9ff62c5b0..f193a9ab87b 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -382,7 +382,6 @@ if ($action == "sign" && $permissiontoclose) { foreach ($toselect as $checked) { if ($tmpproposal->fetch($checked) > 0) { if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED) { - $tmpproposal->statut = $tmpproposal::STATUS_SIGNED;; if ($tmpproposal->closeProposal($user, $tmpproposal::STATUS_SIGNED) >= 0) { setEventMessage($tmpproposal->ref." ".$langs->trans('Signed'), 'mesgs'); diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 6ce6e20e753..93344b39cd0 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -186,7 +186,7 @@ if (empty($reshook)) { // -3 means type not found (PROJECTLEADER renamed, de-activated or deleted), so don't prevent creation if it has been the case if ($result == -3) { setEventMessage('ErrorPROJECTLEADERRoleMissingRestoreIt', 'errors'); - $error++; + $error++; } elseif ($result < 0) { $langs->load("errors"); setEventMessages($object->error, $object->errors, 'errors'); From 6438a9996036f7e47e1c87e5d0761889fa91f947 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Mar 2022 11:48:51 +0100 Subject: [PATCH 2/4] Fix php syntax --- htdocs/comm/propal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index f193a9ab87b..7a8fe187570 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -382,7 +382,7 @@ if ($action == "sign" && $permissiontoclose) { foreach ($toselect as $checked) { if ($tmpproposal->fetch($checked) > 0) { if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED) { - $tmpproposal->statut = $tmpproposal::STATUS_SIGNED;; + $tmpproposal->statut = $tmpproposal::STATUS_SIGNED; if ($tmpproposal->closeProposal($user, $tmpproposal::STATUS_SIGNED) >= 0) { setEventMessage($tmpproposal->ref." ".$langs->trans('Signed'), 'mesgs'); } else { From 6c28426b3aacd6917f39196b3fe0eab83cdd037c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Mar 2022 11:49:34 +0100 Subject: [PATCH 3/4] Fix tab --- htdocs/viewimage.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 45f46159aa8..db03a0a79e6 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -113,7 +113,7 @@ if (is_numeric($entity)) { * @ignore * @return void */ -function llxHeader() +function llxHeader()sql { } /** @@ -237,8 +237,8 @@ if (empty($modulepart)) { // When logged in a different entity, medias cannot be accessed because $conf->$module->multidir_output // is not set on the requested entity, but they are public documents, so reset entity if ($modulepart === 'medias' && $entity != $conf->entity) { - $conf->entity = $entity; - $conf->setValues($db); + $conf->entity = $entity; + $conf->setValues($db); } $check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $user, $refname); From 154069179b5958ccde7531e58c43f38bcfb4594d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Mar 2022 11:51:06 +0100 Subject: [PATCH 4/4] Fix php syntax --- htdocs/viewimage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index db03a0a79e6..feec8acf254 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -113,7 +113,7 @@ if (is_numeric($entity)) { * @ignore * @return void */ -function llxHeader()sql +function llxHeader() { } /**