diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php
index 6f211112a25..869644dc8a2 100644
--- a/htdocs/comm/action/document.php
+++ b/htdocs/comm/action/document.php
@@ -203,7 +203,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
//$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php
index 21e7dedf5a2..f7b3098126c 100644
--- a/htdocs/comm/action/info.php
+++ b/htdocs/comm/action/info.php
@@ -127,7 +127,7 @@ $morehtmlref = '
';
if (isModEnabled('project')) {
$langs->load("projects");
//$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/comm/propal/agenda.php b/htdocs/comm/propal/agenda.php
index 1ba9bf93903..fb39a439b96 100644
--- a/htdocs/comm/propal/agenda.php
+++ b/htdocs/comm/propal/agenda.php
@@ -162,7 +162,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' ';
diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php
index d38a5a3b463..a0f1494a747 100644
--- a/htdocs/comm/propal/contact.php
+++ b/htdocs/comm/propal/contact.php
@@ -166,7 +166,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php
index 417ceac162b..f873f40ba2b 100644
--- a/htdocs/comm/propal/document.php
+++ b/htdocs/comm/propal/document.php
@@ -147,7 +147,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/comm/propal/messaging.php b/htdocs/comm/propal/messaging.php
index 7420e251538..f8818f53334 100644
--- a/htdocs/comm/propal/messaging.php
+++ b/htdocs/comm/propal/messaging.php
@@ -77,17 +77,16 @@ if (GETPOST('actioncode', 'array')) {
$search_rowid = GETPOST('search_rowid');
$search_agenda_label = GETPOST('search_agenda_label');
+// Initialize a technical objects
+$object = new Propal($db);
$hookmanager->initHooks(array('propalagenda', 'globalcard'));
// Security check
-$id = GETPOSTINT("id");
-$socid = 0;
-//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of order and assignment.
-$result = restrictedArea($user, 'propal', $id, 'propal&propal'); // Changed from projet and project
-
-if (!$user->hasRight('propal', 'lire')) { // Changed from projet
- accessforbidden();
+if ($user->socid > 0) {
+ $socid = $user->socid;
}
+$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
+restrictedArea($user, 'propal', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
@@ -153,7 +152,7 @@ $morehtmlref .= '
' . $object->thirdparty->getNomUrl(1);
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' ';
diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php
index 8e5313da08e..147e0bb3fea 100644
--- a/htdocs/comm/propal/note.php
+++ b/htdocs/comm/propal/note.php
@@ -125,7 +125,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/commande/agenda.php b/htdocs/commande/agenda.php
index 482422c2ebe..bfc474204a2 100644
--- a/htdocs/commande/agenda.php
+++ b/htdocs/commande/agenda.php
@@ -78,13 +78,22 @@ if (GETPOST('actioncode', 'array')) {
$search_rowid = GETPOST('search_rowid');
$search_agenda_label = GETPOST('search_agenda_label');
-$hookmanager->initHooks(array('orderagenda', 'globalcard')); // Changed from projectcardinfo
+// Initialize a technical objects
+$object = new Commande($db);
+$hookmanager->initHooks(array('orderagenda', 'globalcard'));
+
+// Load object
+include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. Include fetch and fetch_thirdparty but not fetch_optionals
+if ($id > 0 || !empty($ref)) {
+ $upload_dir = $conf->order->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity] . "/" . $object->id;
+}
// Security check
-$id = GETPOSTINT("id");
-$socid = 0;
-//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignment.
-$result = restrictedArea($user, 'commande', $id, 'commande&order'); // Changed from projet and project
+if ($user->socid > 0) {
+ $socid = $user->socid;
+}
+$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
+restrictedArea($user, 'commande', $id, '', '', 'fk_soc', 'rowid', $isdraft);
if (!$user->hasRight('commande', 'lire')) { // Changed from projet
accessforbidden();
@@ -161,7 +170,7 @@ $morehtmlref .= '
' . $object->thirdparty->getNomUrl(1);
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' ';
diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php
index 57f363dce5e..0eecf0c4592 100644
--- a/htdocs/commande/contact.php
+++ b/htdocs/commande/contact.php
@@ -157,7 +157,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php
index bcd59a7ac19..c92c0500a4a 100644
--- a/htdocs/commande/document.php
+++ b/htdocs/commande/document.php
@@ -150,7 +150,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/commande/messaging.php b/htdocs/commande/messaging.php
index a92f4114ebe..5ae6624d6ec 100644
--- a/htdocs/commande/messaging.php
+++ b/htdocs/commande/messaging.php
@@ -78,11 +78,22 @@ $search_agenda_label = GETPOST('search_agenda_label');
$hookmanager->initHooks(array('orderagenda', 'globalcard'));
+// Initialize a technical objects
+$object = new Commande($db);
+$hookmanager->initHooks(array('orderagenda', 'globalcard'));
+
+// Load object
+include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. Include fetch and fetch_thirdparty but not fetch_optionals
+if ($id > 0 || !empty($ref)) {
+ $upload_dir = $conf->order->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity] . "/" . $object->id;
+}
+
// Security check
-$id = GETPOSTINT("id");
-$socid = 0;
-//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of order and assignment.
-$result = restrictedArea($user, 'commande', $id, 'commande&order'); // Changed from projet and project
+if ($user->socid > 0) {
+ $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of order and assignment.
+}
+$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
+restrictedArea($user, 'commande', $id, '', '', 'fk_soc', 'rowid', $isdraft);
if (!$user->hasRight('commande', 'lire')) { // Changed from projet
accessforbidden();
diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php
index 73a4d47eb27..88abba45e0b 100644
--- a/htdocs/commande/note.php
+++ b/htdocs/commande/note.php
@@ -119,7 +119,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/compta/facture/agenda-rec.php b/htdocs/compta/facture/agenda-rec.php
index 86ce5589799..dfec53e54da 100644
--- a/htdocs/compta/facture/agenda-rec.php
+++ b/htdocs/compta/facture/agenda-rec.php
@@ -166,7 +166,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/compta/facture/agenda.php b/htdocs/compta/facture/agenda.php
index 9f56337ccce..86f3deb0fae 100644
--- a/htdocs/compta/facture/agenda.php
+++ b/htdocs/compta/facture/agenda.php
@@ -80,7 +80,7 @@ if (!$sortorder) {
// Initialize a technical objects
$object = new Facture($db);
$extrafields = new ExtraFields($db);
-$diroutputmassaction = $conf->facture->multidir_output[$conf->entity].'/temp/massgeneration/'.$user->id;
+$diroutputmassaction = $conf->invoice->multidir_output[$conf->entity].'/temp/massgeneration/'.$user->id;
$hookmanager->initHooks(array('invoiceagenda', 'globalcard')); // Note that conf->hooks_modules contains array
// Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
@@ -88,7 +88,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. Include fetch and fetch_thirdparty but not fetch_optionals
if ($id > 0 || !empty($ref)) {
- $upload_dir = $conf->facture->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id;
+ $upload_dir = $conf->invoice->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id;
}
$permissiontoread = $user->hasRight("facture", "lire");
@@ -161,7 +161,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php
index 2d1be08a4ac..02e169952dc 100644
--- a/htdocs/compta/facture/contact.php
+++ b/htdocs/compta/facture/contact.php
@@ -164,7 +164,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php
index 7f9726c0705..f66acf8d918 100644
--- a/htdocs/compta/facture/document.php
+++ b/htdocs/compta/facture/document.php
@@ -165,7 +165,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/compta/facture/messaging.php b/htdocs/compta/facture/messaging.php
index 26a60408da1..3b91e447237 100644
--- a/htdocs/compta/facture/messaging.php
+++ b/htdocs/compta/facture/messaging.php
@@ -161,7 +161,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/compta/facture/note-rec.php b/htdocs/compta/facture/note-rec.php
index 840d392a3f4..2159fb9231e 100644
--- a/htdocs/compta/facture/note-rec.php
+++ b/htdocs/compta/facture/note-rec.php
@@ -148,7 +148,7 @@ if ($id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php
index cfbecdf2e60..33420252456 100644
--- a/htdocs/compta/facture/note.php
+++ b/htdocs/compta/facture/note.php
@@ -135,7 +135,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php
index 21159e993bc..7544ba7a5a2 100644
--- a/htdocs/compta/facture/prelevement.php
+++ b/htdocs/compta/facture/prelevement.php
@@ -383,7 +383,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php
index be1d9b3ddf7..bd8177b6217 100644
--- a/htdocs/contrat/agenda.php
+++ b/htdocs/contrat/agenda.php
@@ -204,7 +204,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php
index ad515452132..592d7caccbc 100644
--- a/htdocs/contrat/contact.php
+++ b/htdocs/contrat/contact.php
@@ -187,7 +187,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php
index 991070ea1a3..3fb3d427f8a 100644
--- a/htdocs/contrat/document.php
+++ b/htdocs/contrat/document.php
@@ -162,7 +162,7 @@ if ($object->id) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/contrat/messaging.php b/htdocs/contrat/messaging.php
index 2b234175a80..186d4e65108 100644
--- a/htdocs/contrat/messaging.php
+++ b/htdocs/contrat/messaging.php
@@ -200,7 +200,7 @@ if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id >
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php
index e57024f5b8d..2e4175430ad 100644
--- a/htdocs/contrat/note.php
+++ b/htdocs/contrat/note.php
@@ -133,7 +133,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/delivery/card.php b/htdocs/delivery/card.php
index 0c6d28df4b3..173bc16dbbd 100644
--- a/htdocs/delivery/card.php
+++ b/htdocs/delivery/card.php
@@ -376,7 +376,7 @@ if ($action == 'create') {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on shipment
+ if (0) { // @phpstan-ignore-line Do not change on shipment
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index 77b00711dfb..8e434029c6b 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -2192,7 +2192,7 @@ if ($action == 'create') {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on shipment
+ if (0) { // @phpstan-ignore-line Do not change on shipment
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' ';
diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php
index fb79ea4abd8..12c6201235d 100644
--- a/htdocs/expedition/contact.php
+++ b/htdocs/expedition/contact.php
@@ -170,7 +170,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on shipment
+ if (0) { // @phpstan-ignore-line Do not change on shipment
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/expedition/dispatch.php b/htdocs/expedition/dispatch.php
index fdcadcfe8eb..ca7ca180f63 100644
--- a/htdocs/expedition/dispatch.php
+++ b/htdocs/expedition/dispatch.php
@@ -467,7 +467,7 @@ if ($object->id > 0 || !empty($object->ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on reception
+ if (0) { // @phpstan-ignore-line Do not change on reception
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify' && $permissiontoadd) {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/expedition/document.php b/htdocs/expedition/document.php
index 4dc74e52a72..0b29655bcd1 100644
--- a/htdocs/expedition/document.php
+++ b/htdocs/expedition/document.php
@@ -156,7 +156,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on shipment
+ if (0) { // @phpstan-ignore-line Do not change on shipment
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php
index f2186c1be04..86fea6a0ef4 100644
--- a/htdocs/expedition/note.php
+++ b/htdocs/expedition/note.php
@@ -125,7 +125,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on shipment
+ if (0) { // @phpstan-ignore-line Do not change on shipment
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index 26f8cdeb4f8..c8ae9266a2c 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -301,7 +301,7 @@ if ($order_id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on shipment
+ if (0) { // @phpstan-ignore-line Do not change on shipment
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fichinter/agenda.php b/htdocs/fichinter/agenda.php
index 59a19fb4f36..88cea17dd78 100644
--- a/htdocs/fichinter/agenda.php
+++ b/htdocs/fichinter/agenda.php
@@ -160,7 +160,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php
index 8ae5c2a85af..dac023046f2 100644
--- a/htdocs/fourn/commande/contact.php
+++ b/htdocs/fourn/commande/contact.php
@@ -165,7 +165,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify' && $caneditproject) { // Always false @phpstan-ignore-line
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index fa0ac12e734..ba0eaa7ba7f 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -582,7 +582,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$caneditproject = false; // For static analysis
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify' && $caneditproject) {
diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php
index 2a6c5d18865..8db78b4d0cd 100644
--- a/htdocs/fourn/commande/document.php
+++ b/htdocs/fourn/commande/document.php
@@ -146,7 +146,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify' && $caneditproject) { // Always false @phpstan-ignore-line
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php
index 11ca80f1469..ae7eee143a3 100644
--- a/htdocs/fourn/commande/info.php
+++ b/htdocs/fourn/commande/info.php
@@ -160,7 +160,7 @@ $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1);
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify' && $caneditproject) { // Always false @phpstan-ignore-line
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php
index 11ce8bb03dd..e0a5b991d20 100644
--- a/htdocs/fourn/commande/note.php
+++ b/htdocs/fourn/commande/note.php
@@ -128,7 +128,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify' && $caneditproject) { // Always false @phpstan-ignore-line
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fourn/facture/agenda.php b/htdocs/fourn/facture/agenda.php
index 7b95b3cd375..c1217720586 100644
--- a/htdocs/fourn/facture/agenda.php
+++ b/htdocs/fourn/facture/agenda.php
@@ -178,7 +178,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php
index 0b4173f197c..101d6aba6bc 100644
--- a/htdocs/fourn/facture/contact.php
+++ b/htdocs/fourn/facture/contact.php
@@ -166,7 +166,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php
index ced79383e78..f8004fd834c 100644
--- a/htdocs/fourn/facture/document.php
+++ b/htdocs/fourn/facture/document.php
@@ -130,7 +130,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php
index f98ed81af1b..e470cceabfe 100644
--- a/htdocs/fourn/facture/info.php
+++ b/htdocs/fourn/facture/info.php
@@ -47,6 +47,8 @@ if (isModEnabled('project')) {
$langs->loadLangs(array("companies", "bills"));
+$action = GETPOST('action', 'aZ09');
+
$id = GETPOSTINT("facid") ? GETPOSTINT("facid") : GETPOSTINT("id");
$ref = GETPOST("ref", 'alpha');
@@ -96,7 +98,7 @@ if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id >
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fourn/facture/messaging.php b/htdocs/fourn/facture/messaging.php
index 302688b33b2..0ad38e9738b 100644
--- a/htdocs/fourn/facture/messaging.php
+++ b/htdocs/fourn/facture/messaging.php
@@ -180,7 +180,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fourn/facture/note-rec.php b/htdocs/fourn/facture/note-rec.php
index bfa7471a04f..40176307ffd 100644
--- a/htdocs/fourn/facture/note-rec.php
+++ b/htdocs/fourn/facture/note-rec.php
@@ -152,7 +152,7 @@ if ($id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php
index cd01fa7a702..8e6c8cf860a 100644
--- a/htdocs/fourn/facture/note.php
+++ b/htdocs/fourn/facture/note.php
@@ -126,7 +126,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/mrp/mo_agenda.php b/htdocs/mrp/mo_agenda.php
index 9ae27d12263..839dbd763d5 100644
--- a/htdocs/mrp/mo_agenda.php
+++ b/htdocs/mrp/mo_agenda.php
@@ -181,7 +181,7 @@ if ($object->id > 0) {
if (is_object($object->thirdparty)) {
$morehtmlref .= '
';
}
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/mrp/mo_document.php b/htdocs/mrp/mo_document.php
index b4e950d82e0..eec633ee932 100644
--- a/htdocs/mrp/mo_document.php
+++ b/htdocs/mrp/mo_document.php
@@ -152,7 +152,7 @@ if ($object->id) {
if (is_object($object->thirdparty)) {
$morehtmlref .= '
';
}
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php
index c2ba92da2ca..d2f220472ff 100644
--- a/htdocs/mrp/mo_note.php
+++ b/htdocs/mrp/mo_note.php
@@ -129,7 +129,7 @@ if ($id > 0 || !empty($ref)) {
if (is_object($object->thirdparty)) {
$morehtmlref .= '
';
}
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php
index 7b3c98b22c8..a6bc2b202c2 100644
--- a/htdocs/opensurvey/class/opensurveysondage.class.php
+++ b/htdocs/opensurvey/class/opensurveysondage.class.php
@@ -805,11 +805,7 @@ class Opensurveysondage extends CommonObject
$statusType = 'status'.$status;
if ($status == self::STATUS_VALIDATED) {
- if (0) {
- $statusType = 'status1';
- } else {
- $statusType = 'status4';
- }
+ $statusType = 'status4';
}
if ($status == self::STATUS_CLOSED) {
$statusType = 'status6';
diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php
index 25b673135f3..7e524d39d3f 100644
--- a/htdocs/reception/card.php
+++ b/htdocs/reception/card.php
@@ -1494,7 +1494,7 @@ if ($action == 'create') {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on reception
+ if (0) { // @phpstan-ignore-line Do not change on reception
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify' && $permissiontoadd) {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php
index 9934561c8f1..796c7adda38 100644
--- a/htdocs/reception/contact.php
+++ b/htdocs/reception/contact.php
@@ -182,7 +182,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on reception
+ if (0) { // @phpstan-ignore-line Do not change on reception
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify' && $permissiontoadd) {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/reception/dispatch.php b/htdocs/reception/dispatch.php
index 59ef0c0797f..82468f86c32 100644
--- a/htdocs/reception/dispatch.php
+++ b/htdocs/reception/dispatch.php
@@ -374,7 +374,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on reception
+ if (0) { // @phpstan-ignore-line Do not change on reception
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify' && $permissiontoadd) {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/reception/document.php b/htdocs/reception/document.php
index 34c81c943ae..3f29b2f6765 100644
--- a/htdocs/reception/document.php
+++ b/htdocs/reception/document.php
@@ -168,7 +168,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on reception
+ if (0) { // @phpstan-ignore-line Do not change on reception
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify' && $permissiontoadd) {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php
index 3078850d972..fd04c6efaf3 100644
--- a/htdocs/reception/note.php
+++ b/htdocs/reception/note.php
@@ -148,7 +148,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) { // Do not change on reception
+ if (0) { // @phpstan-ignore-line Do not change on reception
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify' && $permissiontoadd) {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php
index 8e1a9fd4d7c..25f79dd51a1 100644
--- a/htdocs/resource/element_resource.php
+++ b/htdocs/resource/element_resource.php
@@ -394,7 +394,7 @@ if (!$ret) {
if (isModEnabled('project')) {
$langs->load("projects");
//$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/supplier_proposal/contact.php b/htdocs/supplier_proposal/contact.php
index d2181e2a6e9..1818f090ae8 100644
--- a/htdocs/supplier_proposal/contact.php
+++ b/htdocs/supplier_proposal/contact.php
@@ -166,7 +166,7 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php
index 70aa85e623d..ad638e6cd97 100644
--- a/htdocs/supplier_proposal/document.php
+++ b/htdocs/supplier_proposal/document.php
@@ -139,7 +139,7 @@ if ($object->id > 0) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php
index ee9f1a453a2..4434594ee1a 100644
--- a/htdocs/supplier_proposal/info.php
+++ b/htdocs/supplier_proposal/info.php
@@ -47,6 +47,8 @@ if (isModEnabled('project')) {
// Load translation files required by the page
$langs->loadLangs(array('supplier_proposal', 'compta'));
+$action = GETPOST('action', 'aZ09');
+
$id = GETPOSTINT('id');
$socid = GETPOSTINT('socid');
@@ -54,7 +56,7 @@ $socid = GETPOSTINT('socid');
if (!empty($user->socid)) {
$socid = $user->socid;
}
-$result = restrictedArea($user, 'supplier_proposal', $id);
+restrictedArea($user, 'supplier_proposal', $id);
$permissiontoadd = $user->hasRight('supplier_proposal', 'creer');
@@ -99,7 +101,7 @@ $morehtmlref .= $object->thirdparty->getNomUrl(1);
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
diff --git a/htdocs/ticket/agenda.php b/htdocs/ticket/agenda.php
index 0c691a5a137..aa3bbdbb2db 100644
--- a/htdocs/ticket/agenda.php
+++ b/htdocs/ticket/agenda.php
@@ -222,7 +222,7 @@ if (isModEnabled("societe")) {
// Project
if (isModEnabled('project')) {
$langs->load("projects");
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= '
';
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
diff --git a/htdocs/ticket/contact.php b/htdocs/ticket/contact.php
index 25b05722422..cfe88c5adc5 100644
--- a/htdocs/ticket/contact.php
+++ b/htdocs/ticket/contact.php
@@ -259,7 +259,7 @@ if ($id > 0 || !empty($track_id) || !empty($ref)) {
// Project
if (isModEnabled('project')) {
$langs->load("projects");
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= '
';
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
diff --git a/htdocs/ticket/document.php b/htdocs/ticket/document.php
index 9621af19efe..f78278fcbec 100644
--- a/htdocs/ticket/document.php
+++ b/htdocs/ticket/document.php
@@ -194,7 +194,7 @@ if ($object->id) {
// Project
if (isModEnabled('project')) {
$langs->load("projects");
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= '
';
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
diff --git a/htdocs/ticket/messaging.php b/htdocs/ticket/messaging.php
index 04fea3ed976..7e9acfb1c09 100644
--- a/htdocs/ticket/messaging.php
+++ b/htdocs/ticket/messaging.php
@@ -221,7 +221,7 @@ if (isModEnabled("societe")) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '
';
- if (0) {
+ if (0) { // @phpstan-ignore-line
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
$morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';