diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 977cfaa63a7..44d793b571c 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -1512,36 +1512,6 @@ parameters: count: 1 path: ../../../htdocs/admin/tools/dolibarr_export.php - - - message: '#^Variable \$dolibarr_main_db_name might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/admin/tools/dolibarr_export.php - - - - message: '#^Variable \$dolibarr_main_db_user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/admin/tools/dolibarr_export.php - - - - message: '#^Variable \$dolibarr_main_db_host might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/admin/tools/dolibarr_import.php - - - - message: '#^Variable \$dolibarr_main_db_name might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/admin/tools/dolibarr_import.php - - - - message: '#^Variable \$dolibarr_main_db_user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/admin/tools/dolibarr_import.php - - message: '#^Variable \$ExecTimeLimit in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -2043,7 +2013,7 @@ parameters: - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue - count: 4 + count: 1 path: ../../../htdocs/barcode/printsheet.php - @@ -3936,12 +3906,6 @@ parameters: count: 1 path: ../../../htdocs/compta/bank/various_payment/info.php - - - message: '#^Variable \$morehtmlright might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/bank/various_payment/info.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -4584,24 +4548,6 @@ parameters: count: 1 path: ../../../htdocs/compta/localtax/quadri_detail.php - - - message: '#^Comparison operation "\<" between 0 and 4 is always true\.$#' - identifier: smaller.alwaysTrue - count: 1 - path: ../../../htdocs/compta/localtax/quadri_detail.php - - - - message: '#^Comparison operation "\>" between 0 and 1 is always false\.$#' - identifier: greater.alwaysFalse - count: 1 - path: ../../../htdocs/compta/localtax/quadri_detail.php - - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../../htdocs/compta/localtax/quadri_detail.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -5454,54 +5400,12 @@ parameters: count: 1 path: ../../../htdocs/compta/tva/clients.php - - - message: '#^Comparison operation "\<" between 0 and 4 is always true\.$#' - identifier: smaller.alwaysTrue - count: 1 - path: ../../../htdocs/compta/tva/clients.php - - - - message: '#^Comparison operation "\>" between 0 and 1 is always false\.$#' - identifier: greater.alwaysFalse - count: 1 - path: ../../../htdocs/compta/tva/clients.php - - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../../htdocs/compta/tva/clients.php - - - - message: '#^Variable \$date_end might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/compta/tva/clients.php - - - - message: '#^Variable \$date_start might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/compta/tva/clients.php - - - - message: '#^Variable \$date_start_year might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/clients.php - - message: '#^Variable \$description might not be defined\.$#' identifier: variable.undefined count: 8 path: ../../../htdocs/compta/tva/clients.php - - - message: '#^Variable \$year_current might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/tva/clients.php - - message: '#^Strict comparison using \=\=\= between true and true will always evaluate to true\.$#' identifier: identical.alwaysTrue @@ -5544,78 +5448,6 @@ parameters: count: 1 path: ../../../htdocs/compta/tva/quadri_detail.php - - - message: '#^Comparison operation "\<" between 0 and 4 is always true\.$#' - identifier: smaller.alwaysTrue - count: 1 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Comparison operation "\>" between 0 and 1 is always false\.$#' - identifier: greater.alwaysFalse - count: 1 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_end might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_end_day might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_end_month might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_end_year might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_start might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_start_day might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_start_month might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_start_year might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$year_current might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/tva/quadri_detail.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -11406,12 +11238,6 @@ parameters: count: 1 path: ../../../htdocs/delivery/class/delivery.class.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/delivery/tpl/linkedobjectblock.tpl.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -14100,42 +13926,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/compare.php - - - message: '#^Variable \$colwidth might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - - - message: '#^Variable \$moreparam might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - - - message: '#^Variable \$permission might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - - - message: '#^Variable \$typeofdata might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - - - message: '#^Variable \$value_private might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - - - message: '#^Variable \$value_public might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - message: '#^Property Establishment\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -18282,12 +18072,6 @@ parameters: count: 1 path: ../../../htdocs/projet/tasks/time.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -18348,30 +18132,6 @@ parameters: count: 1 path: ../../../htdocs/public/demo/index.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/donations/donateurs_code.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 6 - path: ../../../htdocs/public/donations/donateurs_code.php - - - - message: '#^Variable \$i might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/donations/donateurs_code.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../../htdocs/public/donations/donateurs_code.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -19032,12 +18792,6 @@ parameters: count: 1 path: ../../../htdocs/public/users/view.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../../htdocs/public/users/view.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -19098,48 +18852,12 @@ parameters: count: 1 path: ../../../htdocs/public/website/index.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/public/website/index.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/public/website/index.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../../htdocs/public/website/index.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse count: 1 path: ../../../htdocs/public/website/javascript.js.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/public/website/javascript.js.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/public/website/javascript.js.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/public/website/javascript.js.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse @@ -19188,12 +18906,6 @@ parameters: count: 1 path: ../../../htdocs/reception/card.php - - - message: '#^Variable \$line might not be defined\.$#' - identifier: variable.undefined - count: 40 - path: ../../../htdocs/reception/card.php - - message: '#^Variable \$objectsrc might not be defined\.$#' identifier: variable.undefined diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php index 7426ff603ef..885a9efb988 100644 --- a/htdocs/admin/geoipmaxmind.php +++ b/htdocs/admin/geoipmaxmind.php @@ -1,8 +1,8 @@ - * Copyright (C) 2011-2013 Juanjo Menent - * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2009-2019 Laurent Destailleur + * Copyright (C) 2011-2013 Juanjo Menent + * 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 @@ -119,7 +119,7 @@ print "\n"; print ''.$langs->trans("GeoIPLibVersion").''; print ''; $arrayofvalues = array('php' => 'Native PHP functions', '1' => 'Embedded GeoIP v1', '2' => 'Embedded GeoIP v2'); -print $form->selectarray('geoipversion', $arrayofvalues, (isset($conf->global->GEOIP_VERSION) ? $conf->global->GEOIP_VERSION : '2')); +print $form->selectarray('geoipversion', $arrayofvalues, getDolGlobalString('GEOIP_VERSION', '2')); if (getDolGlobalString('GEOIP_VERSION') == 'php') { if ($geoip) { $version = $geoip->getVersion(); @@ -141,7 +141,7 @@ if (getDolGlobalString('GEOIP_VERSION') == 'php') { print 'Using geoip PHP internal functions. Value must be '.geoip_db_filename(GEOIP_COUNTRY_EDITION).' or '.geoip_db_filename(GEOIP_CITY_EDITION_REV1).' or /pathtodatafile/GeoLite2-Country.mmdb
'; } print ''; -if (!file_exists($gimcdf)) { +if (!file_exists(str_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, $gimcdf))) { print '
'.$langs->trans("ErrorFileNotFound", $gimcdf).'
'; } print ''; diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index b5689d41aae..8ad2af9fad5 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -1,7 +1,7 @@ - * Copyright (C) 2006-2021 Regis Houssin - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2006-2018 Laurent Destailleur + * Copyright (C) 2006-2021 Regis Houssin + * 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 @@ -30,6 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; /** + * @var string $dolibarr_main_db_name + * @var string $dolibarr_main_db_user * @var Conf $conf * @var DoliDB $db * @var HookManager $hookmanager diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php index debb2ff3400..09d611bd70b 100644 --- a/htdocs/admin/tools/dolibarr_import.php +++ b/htdocs/admin/tools/dolibarr_import.php @@ -1,7 +1,7 @@ - * Copyright (C) 2006-2012 Regis Houssin - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2006-2021 Laurent Destailleur + * Copyright (C) 2006-2012 Regis Houssin + * 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 @@ -31,6 +31,9 @@ if (! defined('CSRFCHECK_WITH_TOKEN')) { require '../../main.inc.php'; /** + * @var string $dolibarr_main_db_host + * @var string $dolibarr_main_db_name + * @var string $dolibarr_main_db_user * @var Conf $conf * @var DoliDB $db * @var HookManager $hookmanager diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index b07ec34c931..848d590185a 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2734,6 +2734,9 @@ class Facture extends CommonInvoice if (!isset($this->user_creation_id) && isset($this->fk_user_author)) { $this->user_creation_id = $this->fk_user_author; } + if (!isset($this->user_modifcation_id) && !empty($user->id)) { + $this->user_modification_id = $user->id; + } if (!isset($this->user_validation_id) && isset($this->fk_user_valid)) { $this->user_validation_id = $this->fk_user_valid; } @@ -2762,6 +2765,7 @@ class Facture extends CommonInvoice $sql .= " revenuestamp=".((isset($this->revenuestamp) && $this->revenuestamp != '') ? (float) $this->revenuestamp : "null").","; $sql .= " fk_statut=".(isset($this->status) ? (int) $this->status : "null").","; $sql .= " fk_user_author=".(isset($this->user_creation_id) ? ((int) $this->user_creation_id) : "null").","; + $sql .= " fk_user_modif=".(!empty($user->id) ? ((int) $user->id) : "null").","; $sql .= " fk_user_valid=".(isset($this->user_validation_id) ? (int) $this->user_validation_id : "null").","; $sql .= " fk_facture_source=".(isset($this->fk_facture_source) ? (int) $this->fk_facture_source : "null").","; $sql .= " fk_projet=".(isset($this->fk_project) ? (int) $this->fk_project : "null").","; @@ -5168,7 +5172,7 @@ class Facture extends CommonInvoice { $sql = 'SELECT c.rowid, datec, date_valid as datev, tms as datem,'; $sql .= ' date_closing as dateclosing,'; - $sql .= ' fk_user_author, fk_user_valid, fk_user_closing'; + $sql .= ' fk_user_author, fk_user_modif, fk_user_valid, fk_user_closing'; $sql .= ' FROM '.MAIN_DB_PREFIX.'facture as c'; $sql .= ' WHERE c.rowid = '.((int) $id); @@ -5179,6 +5183,7 @@ class Facture extends CommonInvoice $this->id = $obj->rowid; $this->user_creation_id = $obj->fk_user_author; + $this->user_modification_id = $obj->fk_user_modif; $this->user_validation_id = $obj->fk_user_valid; $this->user_closing_id = $obj->fk_user_closing; diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index 071c2520a74..543b668a7df 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -32,8 +32,10 @@ global $noMoreLinkedObjectBlockAfter; $langs = $GLOBALS['langs']; '@phan-var-force Translate $langs'; - -global $linkedObjectBlock; +/** + * @var CommonObject $object + */ +$linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("bills"); @@ -76,12 +78,12 @@ foreach ($linkedObjectBlock as $key => $objectlink) { } print ''; print ''.$objectlink->getNomUrl(1).''; - print ''.dol_escape_htmltag($objectlink->ref_client).''; + print ''.dol_escape_htmltag($objectlink->ref_customer).''; print ''.dol_print_date($objectlink->date, 'day').''; print ''; if (!empty($objectlink) && $objectlink->element == 'facture' && $user->hasRight('facture', 'lire')) { '@phan-var-force Facture $objectlink'; - if ($objectlink->statut != 3) { + if ($objectlink->status != 3) { // If not abandoned $total += $objectlink->total_ht; echo price($objectlink->total_ht); diff --git a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php index 24b6a639992..839435d8c7e 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php @@ -3,6 +3,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014 Marcos García * Copyright (C) 2024 MDW + * 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 @@ -33,8 +34,13 @@ global $noMoreLinkedObjectBlockAfter; $langs = $GLOBALS['langs']; '@phan-var-force Translate $langs'; +/** + * @var CommonObject $object + * @var Translate $langs + */ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; -'@phan-var-force CommonObject[] $linkedObjectBlock'; +'@phan-var-force FactureRec[] $linkedObjectBlock'; +/** @var FactureRec[] $linkedObjectBlock */ $langs->load("bills"); diff --git a/htdocs/core/boxes/box_actions_future.php b/htdocs/core/boxes/box_actions_future.php index 17af5c4dcaa..9a57a203a90 100644 --- a/htdocs/core/boxes/box_actions_future.php +++ b/htdocs/core/boxes/box_actions_future.php @@ -1,9 +1,9 @@ - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2014 Charles-Fr BENKE - * Copyright (C) 2015-2024 Frédéric France +/* Copyright (C) 2003-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2014 Charles-Fr BENKE + * Copyright (C) 2015-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -136,7 +136,7 @@ class box_actions_future extends ModeleBoxes $societestatic->name = $objp->name; //$societestatic->name_alias = $objp->name_alias; $societestatic->code_client = $objp->code_client; - $societestatic->code_compta = $objp->code_compta; + $societestatic->code_compta = $objp->code_compta_client; $societestatic->code_compta_client = $objp->code_compta_client; $societestatic->client = $objp->client; $societestatic->logo = $objp->logo; diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php index 26d24a0dfb8..e6dea00c468 100644 --- a/htdocs/core/class/dolgeoip.class.php +++ b/htdocs/core/class/dolgeoip.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -60,6 +60,7 @@ class DolGeoIP { global $conf; + $datfile = str_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, $datfile); $geoipversion = '2'; // 'php', or geoip version '2' if (getDolGlobalString('GEOIP_VERSION')) { $geoipversion = getDolGlobalString('GEOIP_VERSION'); diff --git a/htdocs/public/bookcal/bookcalAjax.php b/htdocs/public/bookcal/bookcalAjax.php index 16e791c859b..cb9e8311b79 100644 --- a/htdocs/public/bookcal/bookcalAjax.php +++ b/htdocs/public/bookcal/bookcalAjax.php @@ -44,7 +44,9 @@ if (!defined('NOBROWSERNOTIF')) { require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - +/** + * @var DoliDB $db + */ $action = GETPOST('action', 'aZ09'); $id = GETPOSTINT('id'); $datetocheckbooking = GETPOSTINT('datetocheck'); diff --git a/htdocs/public/clicktodial/cidlookup.php b/htdocs/public/clicktodial/cidlookup.php index feb1253e760..3f669e222ce 100644 --- a/htdocs/public/clicktodial/cidlookup.php +++ b/htdocs/public/clicktodial/cidlookup.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2010 Servitux Servicios Informaticos + * 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 @@ -55,6 +55,7 @@ include '../../main.inc.php'; /** * @var Conf $conf * @var DoliDB $db + * @var Translate $langs */ $phone = GETPOST('phone'); $securitykey = GETPOST('securitykey'); diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index f9c5e526c62..c37593008e2 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -66,7 +66,11 @@ function llxFooterVierge() // @phan-suppress-current-line PhanRedefineFunction // Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; - +/** + * @var Conf $conf + * @var DoliDB $db + * @var Translate $langs + */ // Security check if (!isModEnabled('don')) { httponly_accessforbidden('Module Donation not enabled'); @@ -97,7 +101,7 @@ if ($resql) { print "Date"; print ''.$langs->trans("Amount").''; print "\n"; - + $i = 0; while ($i < $num) { $objp = $db->fetch_object($resql); @@ -120,6 +124,6 @@ if ($resql) { dol_print_error($db); } -$db->close(); llxFooterVierge(); +$db->close();