diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 5b48916f021..6a682377c4b 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -2550,12 +2550,6 @@ parameters: count: 1 path: ../../../htdocs/core/actions_setmoduleoptions.inc.php - - - message: '#^Variable \$tmpdir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/actions_setmoduleoptions.inc.php - - message: '#^Loose comparison using \=\= between ''directory'' and ''directory'' will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -2688,12 +2682,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/CMailFile.class.php - - - message: '#^Variable \$result might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/class/CMailFile.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -2718,12 +2706,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/commoninvoice.class.php - - - message: '#^Variable \$stripearrayofkeys might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/core/class/commoninvoice.class.php - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -3300,12 +3282,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/utils_diff.class.php - - - message: '#^Variable \$r might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/core/commonfieldsinimport.inc.php - - message: '#^Call to function is_array\(\) with non\-empty\-array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -3330,18 +3306,6 @@ parameters: count: 1 path: ../../../htdocs/core/db/mysqli.class.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/filemanagerdol/browser/default/browser.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/filemanagerdol/browser/default/browser.php - - message: '#^Variable \$_FILES in isset\(\) always exists and is not nullable\.$#' identifier: isset.variable @@ -4002,12 +3966,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/facture/doc/pdf_sponge.modules.php - - - message: '#^Variable \$fac might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/modules/facture/doc/pdf_sponge.modules.php - - message: '#^Access to constant TYPE_NON on an unknown class Sprain\\SwissQrBill\\DataGroup\\Element\\PaymentReference\.$#' identifier: class.notFound @@ -4518,24 +4476,12 @@ parameters: count: 1 path: ../../../htdocs/ecm/dir_add_card.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/ecm/dir_add_card.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue count: 2 path: ../../../htdocs/ecm/index_medias.php - - - message: '#^Variable \$bc might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/ecm/search.php - - message: '#^Call to function is_array\(\) with list\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -4584,12 +4530,6 @@ parameters: count: 1 path: ../../../htdocs/eventorganization/conferenceorbooth_contact.php - - - message: '#^Variable \$mode might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/eventorganization/conferenceorbooth_contact.php - - message: '#^Call to function method_exists\(\) with Project and ''fetchComments'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -4650,18 +4590,6 @@ parameters: count: 1 path: ../../../htdocs/expedition/card.php - - - message: '#^Variable \$rowEnd might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expedition/card.php - - - - message: '#^Variable \$rowExtrafieldsView might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expedition/card.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -4722,18 +4650,6 @@ parameters: count: 3 path: ../../../htdocs/expensereport/card.php - - - message: '#^Variable \$date might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expensereport/card.php - - - - message: '#^Variable \$fk_project might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expensereport/card.php - - message: '#^Call to function method_exists\(\) with \$this\(PaymentExpenseReport\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -4776,12 +4692,6 @@ parameters: count: 1 path: ../../../htdocs/expensereport/class/paymentexpensereport.class.php - - - message: '#^Variable \$linkback might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expensereport/payment/info.php - - message: '#^Comparison operation "\>" between 1 and 1 is always false\.$#' identifier: greater.alwaysFalse @@ -5142,18 +5052,6 @@ parameters: count: 2 path: ../../../htdocs/holiday/define_holiday.php - - - message: '#^Variable \$search_month_update might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/holiday/list.php - - - - message: '#^Variable \$search_year_update might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/holiday/list.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -5166,12 +5064,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/admin/admin_hrm.php - - - message: '#^Variable \$mesg might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/hrm/admin/admin_hrm.php - - message: '#^Call to function method_exists\(\) with \$this\(Position\) and ''getNomUrl'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -5382,12 +5274,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/job_card.php - - - message: '#^Variable \$soc might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/hrm/job_card.php - - message: '#^Comparison operation "\<" between int\<0, max\> and 0 is always false\.$#' identifier: smaller.alwaysFalse @@ -5484,12 +5370,6 @@ parameters: count: 1 path: ../../../htdocs/intracommreport/card.php - - - message: '#^Variable \$soc might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/intracommreport/card.php - - message: '#^Call to function method_exists\(\) with \$this\(IntracommReport\) and ''getNomUrl'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -6300,12 +6180,6 @@ parameters: count: 1 path: ../../../htdocs/partnership/partnership_card.php - - - message: '#^Variable \$soc might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/partnership/partnership_card.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -6546,12 +6420,6 @@ parameters: count: 1 path: ../../../htdocs/product/reassort.php - - - message: '#^Variable \$type might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/reassort.php - - message: '#^Comparison operation "\<" between null and 0 is always false\.$#' identifier: smaller.alwaysFalse @@ -6564,12 +6432,6 @@ parameters: count: 1 path: ../../../htdocs/product/reassortlot.php - - - message: '#^Variable \$type might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/reassortlot.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -6594,18 +6456,6 @@ parameters: count: 1 path: ../../../htdocs/product/stock/class/productstockentrepot.class.php - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/product/stock/info.php - - - - message: '#^Variable \$socid might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/stock/info.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -6684,12 +6534,6 @@ parameters: count: 1 path: ../../../htdocs/product/stock/movement_list.php - - - message: '#^Variable \$productlabelselected might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/product/stock/movement_list.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -6912,12 +6756,6 @@ parameters: count: 1 path: ../../../htdocs/projet/comment.php - - - message: '#^Variable \$mode might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/projet/comment.php - - message: '#^Call to function method_exists\(\) with Project and ''fetchComments'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -7272,12 +7110,6 @@ parameters: count: 1 path: ../../../htdocs/public/bookcal/bookcalAjax.php - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/bookcal/index.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -7320,12 +7152,6 @@ parameters: count: 2 path: ../../../htdocs/public/eventorganization/attendee_new.php - - - message: '#^Variable \$tmpcode might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/eventorganization/attendee_new.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -7566,12 +7392,6 @@ parameters: count: 1 path: ../../../htdocs/public/project/suggestbooth.php - - - message: '#^Variable \$tmpcode might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/public/project/suggestbooth.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -7608,12 +7428,6 @@ parameters: count: 2 path: ../../../htdocs/public/project/suggestconference.php - - - message: '#^Variable \$tmpcode might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/public/project/suggestconference.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -8850,12 +8664,6 @@ parameters: count: 1 path: ../../../htdocs/webhook/class/target.class.php - - - message: '#^Variable \$soc might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/webhook/target_card.php - - message: '#^Result of && is always false\.$#' identifier: booleanAnd.alwaysFalse diff --git a/htdocs/core/actions_setmoduleoptions.inc.php b/htdocs/core/actions_setmoduleoptions.inc.php index 9d51b8f9f7d..de478851a03 100644 --- a/htdocs/core/actions_setmoduleoptions.inc.php +++ b/htdocs/core/actions_setmoduleoptions.inc.php @@ -1,7 +1,7 @@ * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2026 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 @@ -43,11 +43,17 @@ * @var ?int $nomessageinsetmoduleoptions * @var ?string $modulepart * @var ?string $websitetemplateconf + * @var ?string $upload_dir * @var ?array $arrayofparameters */ ' @phan-var-force FormSetup $formSetup +@phan-var-force string $action +@phan-var-force int $error +@phan-var-force ?string $modulepart +@phan-var-force ?string $websitetemplateconf +@phan-var-force ?string $upload_dir '; if (($action == 'update' || !empty($websitetemplateconf)) && !empty($formSetup) && is_object($formSetup) && !empty($user->admin)) { @@ -55,8 +61,6 @@ if (($action == 'update' || !empty($websitetemplateconf)) && !empty($formSetup) return; } -$upload_dir = null; - if (($action == 'update' || !empty($websitetemplateconf)) && !empty($arrayofparameters) && is_array($arrayofparameters) && !empty($user->admin)) { $db->begin(); @@ -118,10 +122,12 @@ if ($action == 'deletefile' && $modulepart == 'doctemplates' && !empty($user->ad } } - $filetodelete = $tmpdir.'/'.GETPOST('file'); - $result = dol_delete_file($filetodelete, 1); - if ($result > 0) { - setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); + if ($upload_dir) { + $filetodelete = $upload_dir.'/'.GETPOST('file'); + $result = dol_delete_file($filetodelete, 1); + if ($result > 0) { + setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); + } } } diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 8b6bef83075..5d22b154d57 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2019-2025 Frédéric France + * Copyright (C) 2019-2026 Frédéric France * Copyright (C) 2024-2026 MDW * Copyright (C) 2025 Joachim Kueter * @@ -1435,6 +1435,7 @@ class CMailFile // send mail $failedRecipients = array(); + $result = false; try { $result = $this->mailer->send($this->message, $failedRecipients); } catch (Exception $e) { diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 7416caf5d53..844e3520841 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -1834,6 +1834,7 @@ abstract class CommonInvoice extends CommonObject dol_syslog("makeStripeSepaRequest Current Saved Stripe environment is ".$savstripearrayofkeysbyenv[$servicestatus]['publishable_key']); $foundalternativestripeaccount = ''; + $stripearrayofkeys = array(); // Force stripe to another value (by default this value is empty) if (! empty($forcestripe)) { diff --git a/htdocs/core/commonfieldsinimport.inc.php b/htdocs/core/commonfieldsinimport.inc.php index bdd818c09d5..6092b7f4349 100644 --- a/htdocs/core/commonfieldsinimport.inc.php +++ b/htdocs/core/commonfieldsinimport.inc.php @@ -1,12 +1,13 @@ + * Copyright (C) 2026 Frédéric France */ '@phan-var-force DolibarrModules $this'; /** @var DolibarrModules $this */ -if (empty($keyforclass) || empty($keyforclassfile) || empty($keyforelement)) { +if (empty($keyforclass) || empty($keyforclassfile) || empty($keyforelement) || empty($r)) { //print $keyforclass.' - '.$keyforclassfile.' - '.$keyforelement; - dol_print_error(null, 'include of file commonfieldsinimport.inc.php was done but var $keyforclass or $keyforclassfile or $keyforelement was not set'); + dol_print_error(null, 'include of file commonfieldsinimport.inc.php was done but var $keyforclass or $keyforclassfile or $keyforelement or $r was not set'); exit; } if (empty($keyforalias)) { diff --git a/htdocs/core/filemanagerdol/browser/default/browser.php b/htdocs/core/filemanagerdol/browser/default/browser.php index f97841a1231..53196613883 100644 --- a/htdocs/core/filemanagerdol/browser/default/browser.php +++ b/htdocs/core/filemanagerdol/browser/default/browser.php @@ -1,6 +1,7 @@ * Copyright (C) 2003-2010 Frederico Caldeira Knabben + * Copyright (C) 2026 Frédéric France * * Source modified from part of fckeditor (http://www.fckeditor.net) * retrieved as GPL v2 or later @@ -23,7 +24,7 @@ //require '../../../../main.inc.php'; require '../../connectors/php/config.inc.php'; // This include the define('NOTOKENRENEWAL',1) and the require main.in.php -global $Config; +global $Config, $conf, $langs; top_httphead(); diff --git a/htdocs/core/lib/doleditor.lib.php b/htdocs/core/lib/doleditor.lib.php index 263b80474d5..180c9d2fceb 100644 --- a/htdocs/core/lib/doleditor.lib.php +++ b/htdocs/core/lib/doleditor.lib.php @@ -2,6 +2,7 @@ /* Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2026 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 @@ -56,7 +57,7 @@ function show_skin($fuser, $edit = 0) print ''; - $var = false; + $var = 0; // Title print ''; diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index bd8a53a6126..e3df6b24535 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -1811,6 +1811,7 @@ class pdf_sponge extends ModelePDFFactures } $i = 1; + $fac = null; if (!empty($TPreviousIncoice)) { $pdf->setY($tab2_top); $posy = $pdf->GetY(); diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index 9e63db431f1..6dadfdd2cb6 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2008-2017 Laurent Destailleur * Copyright (C) 2008-2012 Regis Houssin * Copyright (C) 2015-2024 Alexandre Spangaro - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2025-2026 MDW * * This program is free software; you can redistribute it and/or modify @@ -300,7 +300,7 @@ if (empty($action) || $action == 'delete_section') { print '
'; // Delete - print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', $user->hasRight('ecm', 'setup')); + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?section='.$section.'&action=delete_section&token='.newToken(), '', $user->hasRight('ecm', 'setup')); print '
'; } diff --git a/htdocs/ecm/search.php b/htdocs/ecm/search.php index 76788029518..a463b3d7d6c 100644 --- a/htdocs/ecm/search.php +++ b/htdocs/ecm/search.php @@ -2,7 +2,7 @@ /* Copyright (C) 2008-2017 Laurent Destailleur * Copyright (C) 2008-2009 Regis Houssin * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 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 @@ -38,8 +38,11 @@ require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; * @var HookManager $hookmanager * @var Translate $langs * @var User $user + * @var array $bc */ - +' +@phan-var-force array $bc +'; // Load translation files required by the page $langs->loadLangs(array("ecm", "companies", "other", "users", "orders", "propal", "bills", "contracts")); @@ -259,7 +262,7 @@ foreach ($sectionauto as $sectioncur) { $butshown++; } -print '
'; +print ''; print "
'.$langs->trans("DefaultSkin").'
"; //print $langs->trans("ECMSectionAutoDesc"); diff --git a/htdocs/eventorganization/conferenceorbooth_contact.php b/htdocs/eventorganization/conferenceorbooth_contact.php index 501280c9f9c..022d27b4236 100644 --- a/htdocs/eventorganization/conferenceorbooth_contact.php +++ b/htdocs/eventorganization/conferenceorbooth_contact.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2017 Laurent Destailleur * Copyright (C) 2021 Florian HENRY * Copyright (C) 2024 Alexandre Spangaro - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -65,6 +65,7 @@ $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); $withproject = GETPOSTINT('withproject'); +$mode = GETPOST('mode', 'aZ'); // Initialize a technical objects diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 1ae556b1159..56bbe562258 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -3732,7 +3732,7 @@ if ($action == 'create' && $usercancreate) { } print ''; // Display lines extrafields - if (!empty($rowExtrafieldsStart)) { + if (isset($rowExtrafieldsStart, $rowExtrafieldsView, $rowEnd)) { // @phan-suppress-current-line PhanPluginUndeclaredVariableIsset print $rowExtrafieldsStart; print $rowExtrafieldsView; print $rowEnd; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 44d8696afae..91916cadd9a 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1270,9 +1270,9 @@ if (empty($reshook)) { unset($vatrate); unset($comments); unset($fk_c_type_fees); - unset($fk_project); + $fk_project = 0; - unset($date); + $date = false; } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); diff --git a/htdocs/expensereport/payment/info.php b/htdocs/expensereport/payment/info.php index 562e87a9514..b67d58c2102 100644 --- a/htdocs/expensereport/payment/info.php +++ b/htdocs/expensereport/payment/info.php @@ -84,7 +84,7 @@ $head = payment_expensereport_prepare_head($object); print dol_get_fiche_head($head, 'info', $langs->trans("ExpenseReportPayment"), -1, 'payment'); -//$linkback = '' . $langs->trans("BackToList") . ''; +$linkback = '' . $langs->trans("BackToList") . ''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', ''); diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 167e30395c6..e8cc07873aa 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -97,6 +97,8 @@ $search_ref = GETPOST('search_ref', 'alphanohtml'); $search_day_create = GETPOST('search_day_create', 'int'); $search_month_create = GETPOST('search_month_create', 'int'); $search_year_create = GETPOST('search_year_create', 'int'); +$search_month_update = GETPOST('search_month_update', 'int'); +$search_year_update = GETPOST('search_year_update', 'int'); $search_day_start = GETPOST('search_day_start', 'int'); $search_month_start = GETPOST('search_month_start', 'int'); $search_year_start = GETPOST('search_year_start', 'int'); @@ -207,6 +209,8 @@ if (empty($reshook)) { $search_ref = ""; $search_month_create = ""; $search_year_create = ""; + $search_month_update = ""; + $search_year_update = ""; $search_month_start = ""; $search_year_start = ""; $search_month_end = ""; @@ -343,6 +347,8 @@ $sql .= dolSqlDateFilter("cp.date_debut", $search_day_start, $search_month_start $sql .= dolSqlDateFilter("cp.date_fin", $search_day_end, $search_month_end, $search_year_end); // Create date $sql .= dolSqlDateFilter("cp.date_create", $search_day_create, $search_month_create, $search_year_create); +// Update date +$sql .= dolSqlDateFilter("cp.tms", 0, $search_month_update, $search_year_update); // Employee if (!empty($search_employee) && $search_employee != -1) { $sql .= " AND cp.fk_user = '".$db->escape($search_employee)."'\n"; @@ -437,6 +443,12 @@ if ($search_month_create) { if ($search_year_create) { $param .= '&search_year_create='.urlencode($search_year_create); } +if ($search_month_update) { + $param .= '&search_month_update='.urlencode($search_month_update); +} +if ($search_year_update) { + $param .= '&search_year_update='.urlencode($search_year_update); +} if ($search_day_start) { $param .= '&search_day_start='.urlencode($search_day_start); } diff --git a/htdocs/hrm/admin/admin_hrm.php b/htdocs/hrm/admin/admin_hrm.php index a878285a864..7766ec2aae4 100644 --- a/htdocs/hrm/admin/admin_hrm.php +++ b/htdocs/hrm/admin/admin_hrm.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2025 MDW * * This program is free software: you can redistribute it and/or modify @@ -98,8 +98,6 @@ llxHeader('', $title, ''); $form = new Form($db); -dol_htmloutput_mesg($mesg); - // Subheader $linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; diff --git a/htdocs/hrm/job_card.php b/htdocs/hrm/job_card.php index ca31c833c11..59fc1aa5c20 100644 --- a/htdocs/hrm/job_card.php +++ b/htdocs/hrm/job_card.php @@ -5,7 +5,7 @@ * Copyright (C) 2021 Jean-Pascal BOUDET * Copyright (C) 2021 Grégory BLEMAND * Copyright (C) 2024 MDW - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 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 @@ -426,7 +426,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } if (empty($reshook)) { - $object->formAddObjectLine(1, $mysoc, $soc); + $object->formAddObjectLine(1, $mysoc, null); } } } diff --git a/htdocs/intracommreport/card.php b/htdocs/intracommreport/card.php index 0d81894d2dd..c6288c30ab1 100644 --- a/htdocs/intracommreport/card.php +++ b/htdocs/intracommreport/card.php @@ -424,7 +424,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } if (empty($reshook)) { - $object->formAddObjectLine(1, $mysoc, $soc); + $object->formAddObjectLine(1, $mysoc, null); } } } diff --git a/htdocs/partnership/partnership_card.php b/htdocs/partnership/partnership_card.php index c3c319a9fcb..9bb895dba7a 100644 --- a/htdocs/partnership/partnership_card.php +++ b/htdocs/partnership/partnership_card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2017-2021 Laurent Destailleur * Copyright (C) 2021 NextGestion * Copyright (C) 2024-2026 MDW - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 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 @@ -576,7 +576,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } if (empty($reshook)) { - $object->formAddObjectLine(1, $mysoc, $soc); + $object->formAddObjectLine(1, $mysoc, null); } } } diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 1ca8b4d3df1..c66a50cc31c 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -6,7 +6,7 @@ * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2019 Juanjo Menent * Copyright (C) 2023 Vincent de Grandpré - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2026 MDW * * This program is free software; you can redistribute it and/or modify @@ -347,14 +347,10 @@ if ($resql) { exit; } - if (isset($type)) { - if ($type == 1) { - $texte = $langs->trans("Services"); - } else { - $texte = $langs->trans("Products"); - } + if ($type == 1) { + $texte = $langs->trans("Services"); } else { - $texte = $langs->trans("ProductsAndServices"); + $texte = $langs->trans("Products"); } $texte .= ' ('.$langs->trans("MenuStocks").')'; diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 39fca6733d6..717a0242c7c 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -7,7 +7,7 @@ * Copyright (C) 2016 Ferran Marcet * Copyright (C) 2019 Juanjo Menent * Copyright (C) 2021 Noé Cendrier - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2026 MDW * * This program is free software; you can redistribute it and/or modify @@ -457,14 +457,10 @@ if ($num == 1 && GETPOST('autojumpifoneonly') && ($search_all || $snom || $sref) exit; } -if (isset($type)) { - if ($type == 1) { - $texte = $langs->trans("Services"); - } else { - $texte = $langs->trans("Products"); - } +if ($type == 1) { + $texte = $langs->trans("Services"); } else { - $texte = $langs->trans("ProductsAndServices"); + $texte = $langs->trans("Products"); } $texte .= ' ('.$langs->trans("StocksByLotSerial").')'; diff --git a/htdocs/product/stock/info.php b/htdocs/product/stock/info.php index bd4110804f9..b88b1b6ede6 100644 --- a/htdocs/product/stock/info.php +++ b/htdocs/product/stock/info.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -43,6 +43,8 @@ $langs->load("stocks"); $id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$socid = GETPOSTINT('socid'); // Security check //$result=restrictedArea($user,'stock', $id, 'entrepot&stock'); diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index fccb79efc74..d8fd40c7efb 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2015 Juanjo Menent * Copyright (C) 2018-2022 Ferran Marcet - * Copyright (C) 2019-2025 Frédéric France + * Copyright (C) 2019-2026 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -1717,6 +1717,7 @@ if (count($arrayofuniqueproduct) == 1 && !empty($search_date_startyear) && is_nu print "
"; $productidselected = 0; + $productlabelselected = ''; foreach ($arrayofuniqueproduct as $key => $val) { $productidselected = $key; $productlabelselected = $val; diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php index f116b941dcc..2421e32d178 100644 --- a/htdocs/projet/comment.php +++ b/htdocs/projet/comment.php @@ -3,7 +3,7 @@ * Copyright (C) 2006-2017 Laurent Destailleur * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2026 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 @@ -55,6 +55,7 @@ $objectref = GETPOST("taskref", 'alpha'); // task ref $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $withproject = GETPOSTINT('withproject'); +$mode = GETPOST('mode', 'aZ'); // Security check $socid = 0; diff --git a/htdocs/public/bookcal/index.php b/htdocs/public/bookcal/index.php index 82e1841afc0..bd90ae661f0 100644 --- a/htdocs/public/bookcal/index.php +++ b/htdocs/public/bookcal/index.php @@ -59,6 +59,7 @@ if (!isModEnabled('bookcal')) { * @var Conf $conf * @var DoliDB $db * @var Translate $langs + * @var User $user * * @var string $dolibarr_main_url_root */ diff --git a/htdocs/public/eventorganization/attendee_new.php b/htdocs/public/eventorganization/attendee_new.php index bf962c16e00..c36a06a40a0 100644 --- a/htdocs/public/eventorganization/attendee_new.php +++ b/htdocs/public/eventorganization/attendee_new.php @@ -515,6 +515,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen $modCodeClient = new $module($db); '@phan-var-force ModeleThirdPartyCode $modCodeClient'; + $tmpcode = ''; if (empty($tmpcode) && !empty($modCodeClient->code_auto)) { $tmpcode = $modCodeClient->getNextValue($thirdparty, 0); } diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index 7ad7268ac73..a70f7bbeb0a 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -249,6 +249,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he $thirdparty = null; $contact = null; + $tmpcode = ''; if (!$error) { // Getting the thirdparty or creating it $thirdparty = new Societe($db); diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 3cda6d412e4..895b69cd571 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -249,6 +249,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."
\n"; } + $tmpcode = ''; if (!$error) { // Getting the thirdparty or creating it $thirdparty = new Societe($db); diff --git a/htdocs/webhook/target_card.php b/htdocs/webhook/target_card.php index 2d993ebcb2e..3d70d06e118 100644 --- a/htdocs/webhook/target_card.php +++ b/htdocs/webhook/target_card.php @@ -447,7 +447,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } if (empty($reshook)) { - $object->formAddObjectLine(1, $mysoc, $soc); + $object->formAddObjectLine(1, $mysoc, null); } } }