Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur (aka Eldy) 2025-01-02 17:39:57 +01:00
commit d49657c385
12 changed files with 31 additions and 27 deletions

View file

@ -3,7 +3,7 @@
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2021 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2006-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
/* Copyright (C) 2006-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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

View file

@ -101,7 +101,7 @@ $documentation->showSidebar(); ?>
$label = 'My action label used for accessibility visually for impaired people';
$user_right = 1;
$html = '<span class="fa fa-comments paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayMessages');;
$html = '<span class="fa fa-comments paddingright"></span>'.$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(); ?>
<?php
$label = 'My action label used for accessibility visually for impaired people';
$user_right = 1;
$html = '<span class="fa fa-comment paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayOKMessage');;
$html = '<span class="fa fa-comment paddingright"></span>'.$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 = '<span class="fa fa-comment paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayWarningMessage');;
$html = '<span class="fa fa-comment paddingright"></span>'.$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 = '<span class="fa fa-comment paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayErrorMessage');;
$html = '<span class="fa fa-comment paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayErrorMessage');
$action_type = 'displayeventmessageerror';
$url = $_SERVER["PHP_SELF"].'?action=displayeventmessageerror#seteventmessagesection-contextvariations';
$params['attr']['style'] = 'background: #a72947';

View file

@ -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);

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
*
* 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;
}

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* 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;
}

View file

@ -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';

View file

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*/
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;
<?php if (isset($conf->global->THEME_SATURATE_RATIO)) { ?>

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2023-2024 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2023-2024 Lionel Vessiller <lvessiller@easya.solutions>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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);
}
}