From 7a0f37febd6be48baec4b29331e86df9ab9a166b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Mon, 3 Feb 2025 18:33:28 +0100 Subject: [PATCH 1/6] fix phpstan --- dev/build/phpstan/phpstan-baseline.neon | 36 ----------------------- htdocs/core/tpl/card_presend.tpl.php | 5 ++++ htdocs/core/tpl/commonfields_edit.tpl.php | 5 ++-- htdocs/core/tpl/commonfields_view.tpl.php | 3 +- 4 files changed, 10 insertions(+), 39 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 01c75984c0d..1fd9eb19e8c 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -14634,36 +14634,12 @@ parameters: count: 1 path: ../../../htdocs/core/tpl/bloc_showhide.tpl.php - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/card_presend.tpl.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 12 - path: ../../../htdocs/core/tpl/card_presend.tpl.php - - message: '#^Variable \$hidedetails might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/core/tpl/card_presend.tpl.php - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/card_presend.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 6 - path: ../../../htdocs/core/tpl/card_presend.tpl.php - - message: '#^Variable \$modelmail might not be defined\.$#' identifier: variable.undefined @@ -14682,18 +14658,6 @@ parameters: count: 2 path: ../../../htdocs/core/tpl/card_presend.tpl.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/commonfields_edit.tpl.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/commonfields_view.tpl.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 254107a725e..eb7ec2ec97b 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -37,7 +37,12 @@ * @var string $defaulttopiclang * @var string[] $arrayoffamiliestoexclude * @var string $file + * @var string $action * @var CommonObject $object + * @var Conf $conf + * @var DoliDB $db + * @var HookManager $hookmanager + * @var Translate $langs */ ' @phan-var-force int<0,1> $diroutput diff --git a/htdocs/core/tpl/commonfields_edit.tpl.php b/htdocs/core/tpl/commonfields_edit.tpl.php index 530d34a15af..2fdd82a3b76 100644 --- a/htdocs/core/tpl/commonfields_edit.tpl.php +++ b/htdocs/core/tpl/commonfields_edit.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2017-2019 Laurent Destailleur + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -27,6 +27,7 @@ /** * @var CommonObject $object * @var Conf $conf + * @var DoliDB $db * @var Form $form * @var FormAdmin $formadmin * @var Translate $langs diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php index 5122a2e7944..cca11e95467 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -28,6 +28,7 @@ /** * @var CommonObject $object * @var Conf $conf + * @var DoliDB $db * @var Form $form * @var FormAdmin $formadmin * @var Translate $langs From fb0083a3ec147dbfa4ba025a69e98ba7929d4fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Mon, 3 Feb 2025 18:37:57 +0100 Subject: [PATCH 2/6] fix phpstan --- dev/build/phpstan/phpstan-baseline.neon | 18 ------------------ htdocs/core/tpl/commonfields_view.tpl.php | 2 +- htdocs/core/tpl/contacts.tpl.php | 4 +++- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 1fd9eb19e8c..788622de452 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -14670,30 +14670,12 @@ parameters: count: 1 path: ../../../htdocs/core/tpl/contacts.tpl.php - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/contacts.tpl.php - - message: '#^Variable \$conf might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/core/tpl/contacts.tpl.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/core/tpl/contacts.tpl.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/contacts.tpl.php - - message: '#^Variable \$action might not be defined\.$#' identifier: variable.undefined diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php index cca11e95467..1eeb8603cc5 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 85413f255e1..3f4abfee8bb 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -2,7 +2,7 @@ /* Copyright (C) 2012 Regis Houssin * Copyright (C) 2013-2015 Laurent Destailleur * Copyright (C) 2015-2016 Charlie BENKE - * Copyright (C) 2021-2024 Frédéric France + * Copyright (C) 2021-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -27,7 +27,9 @@ /** * @var ?CommonObject $object * @var ?CommonObject $objectsrc + * @var DoliDB $db * @var Form $form + * @var HookManager $hookmanager * @var Translate $langs * @var User $user * @var ?string $permission From 2794f53a10a5955b38ad4935fd8930086704cbc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Mon, 3 Feb 2025 18:42:04 +0100 Subject: [PATCH 3/6] fix phpstan --- dev/build/phpstan/phpstan-baseline.neon | 30 ------------------- .../tpl/extrafields_list_search_input.tpl.php | 23 ++++++++++++++ .../tpl/extrafields_list_search_param.tpl.php | 22 ++++++++++++++ .../tpl/extrafields_list_search_sql.tpl.php | 22 ++++++++++++++ .../tpl/extrafields_list_search_title.tpl.php | 21 +++++++++++++ 5 files changed, 88 insertions(+), 30 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 788622de452..311e90abeb2 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -14760,12 +14760,6 @@ parameters: count: 2 path: ../../../htdocs/core/tpl/extrafields_list_print_fields.tpl.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/extrafields_list_search_input.tpl.php - - message: '#^Variable \$extrafields might not be defined\.$#' identifier: variable.undefined @@ -14778,12 +14772,6 @@ parameters: count: 2 path: ../../../htdocs/core/tpl/extrafields_list_search_param.tpl.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/extrafields_list_search_param.tpl.php - - message: '#^Variable \$param might not be defined\.$#' identifier: variable.undefined @@ -14802,30 +14790,12 @@ parameters: count: 1 path: ../../../htdocs/core/tpl/extrafields_list_search_sql.tpl.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/extrafields_list_search_sql.tpl.php - - message: '#^Variable \$sql might not be defined\.$#' identifier: variable.undefined count: 7 path: ../../../htdocs/core/tpl/extrafields_list_search_sql.tpl.php - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/extrafields_list_search_title.tpl.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/extrafields_list_search_title.tpl.php - - message: '#^Variable \$param might not be defined\.$#' identifier: variable.undefined diff --git a/htdocs/core/tpl/extrafields_list_search_input.tpl.php b/htdocs/core/tpl/extrafields_list_search_input.tpl.php index d9c860a050f..7582f21e471 100644 --- a/htdocs/core/tpl/extrafields_list_search_input.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_input.tpl.php @@ -1,5 +1,28 @@ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * @var Conf $conf + * @var DoliDB $db + * @var CommonObject $object + */ + print ''."\n"; // Protection to avoid direct call of template diff --git a/htdocs/core/tpl/extrafields_list_search_param.tpl.php b/htdocs/core/tpl/extrafields_list_search_param.tpl.php index 4b539cfc0c3..ebb49d9a444 100644 --- a/htdocs/core/tpl/extrafields_list_search_param.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_param.tpl.php @@ -1,5 +1,27 @@ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * @var Conf $conf + * @var CommonObject $object + */ + // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; diff --git a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php index 6901b9a3472..a75c249c352 100644 --- a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php @@ -1,5 +1,27 @@ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * @var Conf $conf + * @var CommonObject $object + */ + // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; diff --git a/htdocs/core/tpl/extrafields_list_search_title.tpl.php b/htdocs/core/tpl/extrafields_list_search_title.tpl.php index d5b4979dcce..b225d507022 100644 --- a/htdocs/core/tpl/extrafields_list_search_title.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_title.tpl.php @@ -1,6 +1,27 @@ + * Copyright (C) 2025 Frédéric France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * @var Conf $conf + * @var CommonObject $object + * @var ?Translate $langs */ // Protection to avoid direct call of template From 1dabc6d1207c60fcc02fa989bb8595a6ce3f87fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Mon, 3 Feb 2025 20:06:32 +0100 Subject: [PATCH 4/6] fix phpstan --- dev/build/phpstan/phpstan-baseline.neon | 6 ------ htdocs/core/tpl/filemanager.tpl.php | 4 ++-- htdocs/core/tpl/formlayoutai.tpl.php | 4 ++-- htdocs/core/tpl/list_print_subtotal.tpl.php | 21 +++++++++++++++++++++ htdocs/core/tpl/notes.tpl.php | 8 +++++--- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 311e90abeb2..238e6fd6ffb 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -14886,12 +14886,6 @@ parameters: count: 2 path: ../../../htdocs/core/tpl/formlayoutai.tpl.php - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/list_print_subtotal.tpl.php - - message: '#^Variable \$limit might not be defined\.$#' identifier: variable.undefined diff --git a/htdocs/core/tpl/filemanager.tpl.php b/htdocs/core/tpl/filemanager.tpl.php index 63318ea609e..1652b8fee92 100644 --- a/htdocs/core/tpl/filemanager.tpl.php +++ b/htdocs/core/tpl/filemanager.tpl.php @@ -1,7 +1,7 @@ - * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/tpl/formlayoutai.tpl.php b/htdocs/core/tpl/formlayoutai.tpl.php index 79e6db0ba9c..944f6d5722b 100644 --- a/htdocs/core/tpl/formlayoutai.tpl.php +++ b/htdocs/core/tpl/formlayoutai.tpl.php @@ -1,7 +1,7 @@ - * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/tpl/list_print_subtotal.tpl.php b/htdocs/core/tpl/list_print_subtotal.tpl.php index 5f04d570ce4..71dfa92158f 100644 --- a/htdocs/core/tpl/list_print_subtotal.tpl.php +++ b/htdocs/core/tpl/list_print_subtotal.tpl.php @@ -1,4 +1,25 @@ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * @var Translate $langs + * @var array{nbfield:int,pos?:array,val?:array} $totalarray + */ '@phan-var-force array{nbfield:int,pos?:array,val?:array} $totalarray'; diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index c78acbae1e0..a2283dae519 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -2,7 +2,7 @@ /* Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2020 Laurent Destailleur - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -19,12 +19,14 @@ * along with this program. If not, see . */ /** - * @var CommonObject $object + * @var ?CommonObject $object * @var Form $form * @var Translate $langs * @var User $user * - * @var int $permissionnote + * @var ?int<0,1> $permissionnote + * @var string $moreparam + * @var ?int $colwidth * @var string $cssclass */ // Protection to avoid direct call of template From 729c7068f0a3f0750194f0476ab67f548cdcb16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Mon, 3 Feb 2025 20:29:43 +0100 Subject: [PATCH 5/6] fix phpstan --- dev/build/phpstan/phpstan-baseline.neon | 12 ------------ htdocs/user/card.php | 11 +++++++---- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 238e6fd6ffb..d93d80a939d 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -30024,18 +30024,6 @@ parameters: count: 7 path: ../../../htdocs/user/card.php - - - message: '#^Variable \$dolibarr_main_authentication might not be defined\.$#' - identifier: variable.undefined - count: 12 - path: ../../../htdocs/user/card.php - - - - message: '#^Variable \$formproduct might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/user/card.php - - message: '#^Variable \$mc might not be defined\.$#' identifier: variable.undefined diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 19334550f40..0aacc461e20 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -13,7 +13,7 @@ * Copyright (C) 2015 Ari Elbaz (elarifr) * Copyright (C) 2015-2018 Charlene Benke * Copyright (C) 2016 Raphaël Doursenaud - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2018 David Beniamine * Copyright (C) 2024 MDW * @@ -70,17 +70,19 @@ if (isModEnabled('stock')) { * @var HookManager $hookmanager * @var Translate $langs * @var User $user + * + * @var string $dolibarr_main_authentication */ // Load translation files required by page $langs->loadLangs(array('users', 'companies', 'ldap', 'admin', 'hrm', 'stocks', 'other')); $id = GETPOSTINT('id'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'aZ09'); $mode = GETPOST('mode', 'alpha'); -$confirm = GETPOST('confirm', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); $group = GETPOSTINT("group", 3); -$cancel = GETPOST('cancel', 'alpha'); +$cancel = GETPOST('cancel', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'useracard'; // To manage different context of search if (empty($id) && $action != 'add' && $action != 'create') { @@ -876,6 +878,7 @@ $formother = new FormOther($db); $formcompany = new FormCompany($db); $formadmin = new FormAdmin($db); $formfile = new FormFile($db); +$formproduct = null; if (isModEnabled('stock')) { $formproduct = new FormProduct($db); } From fa846254e54a8dc44395318c61508f93aaa9f4e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Tue, 4 Feb 2025 20:42:07 +0100 Subject: [PATCH 6/6] fix phpstan --- dev/build/phpstan/phpstan-baseline.neon | 6 ------ htdocs/core/ajax/ajaxdirpreview.php | 18 +++++++++--------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index d93d80a939d..4f95b73a9fb 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -8034,12 +8034,6 @@ parameters: count: 1 path: ../../../htdocs/core/ajax/ajaxdirpreview.php - - - message: '#^Variable \$module might not be defined\.$#' - identifier: variable.undefined - count: 34 - path: ../../../htdocs/core/ajax/ajaxdirpreview.php - - message: '#^Variable \$section might not be defined\.$#' identifier: variable.undefined diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index cf4bf9f79bc..e15ee650179 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -1,12 +1,12 @@ - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005 Simon Tosser - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2010 Pierre Morin - * Copyright (C) 2013 Marcos García - * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2004-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005 Simon Tosser + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2010 Pierre Morin + * Copyright (C) 2013 Marcos García + * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,7 +49,7 @@ if (!defined('NOREQUIREAJAX')) { * @var Translate $langs * @var User $user */ - +$module = ''; if (!isset($mode) || $mode != 'noajax') { // For ajax call require_once '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';