diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index 2d6a212bbab..604f4d5d9c7 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -3,7 +3,7 @@ * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2021 Regis Houssin - * Copyright (C) 2024 Frédéric France + * 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 @@ -100,7 +100,7 @@ if ($action == 'delete') { */ // Increase limit of time. Works only if we are not in safe mode -$ExecTimeLimit = 1800; // 30mn +$ExecTimeLimit = getDolGlobalInt('MAIN_ADMIN_TOOLS_EXPORT_FILES_EXEC_TIME_LIMIT', 1800);; // 30mn if (!empty($ExecTimeLimit)) { $err = error_reporting(); error_reporting(0); // Disable all errors diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index 04498c05132..2fc10104aab 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -1,7 +1,7 @@ - * Copyright (C) 2006-2012 Regis Houssin - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2006-2017 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 @@ -36,6 +36,8 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; * @var HookManager $hookmanager * @var Translate $langs * @var User $user + * + * @var string $dolibarr_main_data_root */ $langs->load("admin"); @@ -64,7 +66,7 @@ if (!$user->admin) { if ($action == 'purge' && !preg_match('/^confirm/i', $choice) && ($choice != 'allfiles' || $confirm == 'yes')) { // Increase limit of time. Works only if we are not in safe mode - $ExecTimeLimit = 600; + $ExecTimeLimit = getDolGlobalInt('MAIN_ADMIN_TOOLS_PURGE_EXEC_TIME_LIMIT', 600); if (!empty($ExecTimeLimit)) { $err = error_reporting(); error_reporting(0); // Disable all errors diff --git a/htdocs/admin/tools/ui/components/event-message.php b/htdocs/admin/tools/ui/components/event-message.php index f612f05a0c2..9de212b8991 100644 --- a/htdocs/admin/tools/ui/components/event-message.php +++ b/htdocs/admin/tools/ui/components/event-message.php @@ -101,7 +101,7 @@ $documentation->showSidebar(); ?> $label = 'My action label used for accessibility visually for impaired people'; $user_right = 1; - $html = ''.$langs->trans('DocSetEventMessageDisplayMessages');; + $html = ''.$langs->trans('DocSetEventMessageDisplayMessages'); $action_type = 'displayeventmessages'; $url = $_SERVER["PHP_SELF"].'?action=displayeventmessages'; print dolGetButtonAction($label, $html, $action_type, $url, '', $user_right); ?> @@ -138,7 +138,7 @@ $documentation->showSidebar(); ?> '.$langs->trans('DocSetEventMessageDisplayOKMessage');; + $html = ''.$langs->trans('DocSetEventMessageDisplayOKMessage'); $action_type = 'displayeventmessageok'; $url = $_SERVER["PHP_SELF"].'?action=displayeventmessageok#seteventmessagesection-contextvariations'; $params['attr']['style'] = 'background: #446548'; @@ -146,7 +146,7 @@ $documentation->showSidebar(); ?> $label = 'My action label used for accessibility visually for impaired people'; $user_right = 1; - $html = ''.$langs->trans('DocSetEventMessageDisplayWarningMessage');; + $html = ''.$langs->trans('DocSetEventMessageDisplayWarningMessage'); $action_type = 'displayeventmessagewarning'; $url = $_SERVER["PHP_SELF"].'?action=displayeventmessagewarning#seteventmessagesection-contextvariations'; $params['attr']['style'] = 'background: #a28918'; @@ -154,7 +154,7 @@ $documentation->showSidebar(); ?> $label = 'My action label used for accessibility visually for impaired people'; $user_right = 1; - $html = ''.$langs->trans('DocSetEventMessageDisplayErrorMessage');; + $html = ''.$langs->trans('DocSetEventMessageDisplayErrorMessage'); $action_type = 'displayeventmessageerror'; $url = $_SERVER["PHP_SELF"].'?action=displayeventmessageerror#seteventmessagesection-contextvariations'; $params['attr']['style'] = 'background: #a72947'; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 3968e297ec3..4c5ee381d51 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -572,7 +572,7 @@ class FactureRec extends CommonInvoice $sql .= " total_ht = ".((float) $this->total_ht).","; $sql .= " total_ttc = ".((float) $this->total_ttc).","; $sql .= " fk_societe_rib = ".(!empty($this->fk_societe_rib) ? ((int) $this->fk_societe_rib) : 'NULL'); - ; + // TODO Add missing fields $sql .= " WHERE rowid = ".((int) $this->id); diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index eaaeb04daa0..5637279b9d7 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Laurent Destailleur - * Copyright (C) 2018-2020 Frédéric France + * Copyright (C) 2018-2024 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 @@ -528,7 +528,7 @@ class Contracts extends DolibarrApi } if ($field == 'array_options' && is_array($value)) { foreach ($value as $index => $val) { - $this->contract->array_options[$index] = $this->_checkValForAPI($field, $val, $this->contract);; + $this->contract->array_options[$index] = $this->_checkValForAPI($field, $val, $this->contract); } continue; } diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 6f70914d9f7..48c6e2f1f89 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -796,7 +796,7 @@ class pdf_eratosthene extends ModelePDFCommandes $drawTabHideTop = $hidetop; $drawTabTop = $tab_top_newpage; - $drawTabBottom = $this->page_hauteur - $heightforfooter;; + $drawTabBottom = $this->page_hauteur - $heightforfooter; $hideBottom = 0; // TODO understand why it change to 1 or 0 during process if ($i == $pageposbeforeprintlines) { diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 7fa776dff12..f3039d6fc2b 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -986,7 +986,7 @@ class pdf_sponge extends ModelePDFFactures $drawTabHideTop = $hidetop; $drawTabTop = $this->tab_top_newpage; - $drawTabBottom = $this->page_hauteur - $this->heightforfooter;; + $drawTabBottom = $this->page_hauteur - $this->heightforfooter; $hideBottom = 0; // TODO understand why it change to 1 or 0 during process if ($i == $pageposbeforeprintlines) { diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index c52dc1b2c16..f30314443f0 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -822,7 +822,7 @@ class pdf_cyan extends ModelePDFPropales $drawTabHideTop = $hidetop; $drawTabTop = $tab_top_newpage; - $drawTabBottom = $this->page_hauteur - $heightforfooter;; + $drawTabBottom = $this->page_hauteur - $heightforfooter; $hideBottom = 0; // TODO understand why it change to 1 or 0 during process if ($i == $pageposbeforeprintlines) { diff --git a/htdocs/projet/class/api_tasks.class.php b/htdocs/projet/class/api_tasks.class.php index 569ae523ce3..e51899beae2 100644 --- a/htdocs/projet/class/api_tasks.class.php +++ b/htdocs/projet/class/api_tasks.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2024 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 @@ -464,7 +465,7 @@ class Tasks extends DolibarrApi } if ($field == 'array_options' && is_array($value)) { foreach ($value as $index => $val) { - $this->task->array_options[$index] = $this->_checkValForAPI($field, $val, $this->task);; + $this->task->array_options[$index] = $this->_checkValForAPI($field, $val, $this->task); } continue; } diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 9bbf3f4b97c..dfa0395f574 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -469,7 +469,7 @@ if ($action == "update_extras" && $permissiontoadd) { $triggermodname = 'SALARY_MODIFY'; - $result = $object->insertExtraFields(empty($triggermodname) ? '' : $triggermodname, $user); + $result = $object->insertExtraFields($triggermodname, $user); if ($result > 0) { setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); $action = 'view'; diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index d399f475ec3..2e9a50e7406 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric France */ if (!defined('ISLOADEDBYSTEELSHEET')) { die('Must be call by steelsheet'); @@ -235,8 +236,8 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { float: left; text-align: center; font-size: 45px; - line-height: 94px;; /* must be same height as min-height of .info-box */ - height: 94px;; /* must be same height as min-height of .info-box */ + line-height: 94px; /* must be same height as min-height of .info-box */ + height: 94px; /* must be same height as min-height of .info-box */ width: 86px; background: var(--colorbacktitle1) !important; global->THEME_SATURATE_RATIO)) { ?> diff --git a/htdocs/webportal/class/webportalinvoice.class.php b/htdocs/webportal/class/webportalinvoice.class.php index c317c412541..be5c6e808c2 100644 --- a/htdocs/webportal/class/webportalinvoice.class.php +++ b/htdocs/webportal/class/webportalinvoice.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2023-2024 Laurent Destailleur * Copyright (C) 2023-2024 Lionel Vessiller * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * 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 @@ -334,14 +334,14 @@ class WebPortalInvoice extends Facture * @param int $paye Status field paye * @param int $status Id status * @param int<0,6> $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=long label + picto - * @param int $alreadypaid 0=No payment already done, >0=Some payments were already done - * @param int $type Type invoice. If -1, we use $this->type - * @param int $arg6 @unused-param Unused arg, keep function compatible with parent class - * @return string Label of status + * @param int $alreadypaid 0=No payment already done, >0=Some payments were already done + * @param int $type Type invoice. If -1, we use $this->type + * @param int $nbofopendirectdebitorcredittransfer Nb of open direct debit or credit transfer + * @return string Label of status */ - public function LibStatut($paye, $status, $mode = 0, $alreadypaid = -1, $type = -1, $arg6 = 0) + public function LibStatut($paye, $status, $mode = 0, $alreadypaid = -1, $type = -1, $nbofopendirectdebitorcredittransfer = 0) { // phpcs:enable - return $this->getInvoiceStatic()->LibStatut($paye, $status, $mode, $alreadypaid, $type); + return $this->getInvoiceStatic()->LibStatut($paye, $status, $mode, $alreadypaid, $type, $nbofopendirectdebitorcredittransfer); } }