diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index efae12c4dcb..6aace13e88f 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -381,12 +381,10 @@ $form = new Form($db); $formother = new FormOther($db); $formadmin = new FormAdmin($db); -print load_fiche_titre($langs->trans("GUISetup"), '', 'title_setup'); +print load_fiche_titre($form->textwithpicto($langs->trans("GUISetup"), $langs->trans("DisplayDesc")), '', 'title_setup'); -print '
'.$langs->trans("DisplayDesc")."
\n"; -print '
'; -//WYSIWYG Editor +// WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; print '
'; diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index eabf1616864..eb6dfbd4713 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -872,6 +872,7 @@ print ''; if ($action == 'doldecrypt' && $user->admin && $exampletodecrypt) { usleep(200); + $decryptedstring = $exampletodecrypt; if (preg_match('/^dolobfuscationv1/', $exampletodecrypt)) { require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; $b = new BlockedLog($db); diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php index 62a4882d4da..4b79d816843 100644 --- a/htdocs/blockedlog/admin/blockedlog.php +++ b/htdocs/blockedlog/admin/blockedlog.php @@ -342,6 +342,7 @@ if (GETPOST('forcegetkeyobfuscation')) { print '
'.$e->getMessage().'
'; } + $obfuscationkey = ''; try { $obfuscationkey = $block_static->getObfuscationKey(); // Note: use the $mysoc->idprof1 and $registrationnumber. On network trouble, an Exception is thrown to the caller print "\n\n"; diff --git a/htdocs/blockedlog/admin/registration.php b/htdocs/blockedlog/admin/registration.php index 3f169832f97..28cc36a0623 100644 --- a/htdocs/blockedlog/admin/registration.php +++ b/htdocs/blockedlog/admin/registration.php @@ -532,7 +532,7 @@ if (empty($mode)) { $state_id = $tmp[0]; } $stateid = getDolGlobalInt('BLOCKEDLOG_REGISTRATION_STATE', (int) $state_id); - $item->fieldInputOverride = $formcompany->select_state($stateid, $country_code, "BLOCKEDLOG_REGISTRATION_STATE"); + $item->fieldInputOverride = $formcompany->select_state($stateid, $mysoc->country_code, "BLOCKEDLOG_REGISTRATION_STATE"); //Company zip $item = $formSetup->newItem('BLOCKEDLOG_REGISTRATION_ZIP'); diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index 091aeb87d41..5424e2c3d44 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -1604,6 +1604,7 @@ class BlockedLog // Get the obfuscation key from ping.dolibarr.org (used just after to decode HMAC secret key) $errormsg = ''; + $obfuscationkey = ''; try { $obfuscationkey = $this->getObfuscationKey(); // Get obfuscation key providing $mysoc->idprof1 and $registrationnumber. Note: On network trouble, an Exception is thrown to the caller } catch (Exception $e) { @@ -1766,7 +1767,7 @@ class BlockedLog } } - return $obfuscationkey; + return (string) $obfuscationkey; } /** diff --git a/htdocs/blockedlog/lib/blockedlog.lib.php b/htdocs/blockedlog/lib/blockedlog.lib.php index 7cc06462165..63305e805c1 100644 --- a/htdocs/blockedlog/lib/blockedlog.lib.php +++ b/htdocs/blockedlog/lib/blockedlog.lib.php @@ -310,6 +310,7 @@ function pdfCertifMentionblockedLog(&$pdf, $outputlangs, $seller, $default_font_ if (in_array($seller->country_code, array('FR'))) { $outputlangs->load("blockedlog"); + $blockedlog_mention = ''; $isalne = isALNEQualifiedVersion(); // If necessary, we could replace with "if isALNERunningVersion()" if ($isalne == 'CERTIF_LNE_IS_2') { @@ -397,7 +398,7 @@ function sumAmountsForUnalterableEvent($block, &$refinvoicefound, &$totalhtamoun * * @param string $idprof1 Counter ID/value of ne record * @param string $registrationnumber Registration number - * @param string $force False. Use true for tests. + * @param boolean $force False. Use true for tests. * @return string Obfuscationkey or 'ERROR ...' if error. */ function callApiToGetObfuscationKey($idprof1, $registrationnumber, $force = false) diff --git a/htdocs/blockedlog/versionmod.inc.php b/htdocs/blockedlog/versionmod.inc.php index 2d913fb0a48..a27c50b613d 100644 --- a/htdocs/blockedlog/versionmod.inc.php +++ b/htdocs/blockedlog/versionmod.inc.php @@ -26,11 +26,11 @@ define('DOLCERT_VERSION', '3.0.0'); // 1 was used for beta version candidate for certification, or for stable version that has been certified. -// 2 to force LNE features for debug purposes(integrity of files will be broken). It just has one difference with 1: https is not required in this mode helping to work in development environment. +// 2 to force LNE features for debug purposes (integrity of files will be broken). It just has one difference with 1: https is not required in this mode helping to work in development environment. // 0 was used for old version, for version not certified but compliant with the law by using an attestation of an IT provider that guarantee // the the software is compliant. WARNING: In this case, you must find an IT company that give you the attestation of conformity. if (!defined('CERTIF_LNE')) { - define('CERTIF_LNE', '1'); + define('CERTIF_LNE', '2'); } diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 4de9dddd06c..5cce1fe3374 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2009-2012 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Florian Henry - * Copyright (C) 2015-2025 Charlene BENKE + * Copyright (C) 2015-2026 Charlene BENKE * Copyright (C) 2016 Raphaël Doursenaud * Copyright (C) 2017 Nicolas ZABOURI * Copyright (C) 2018-2026 Frédéric France @@ -1931,10 +1931,10 @@ class ExtraFields } } - $InfoFieldList[5] = (string) $InfoFieldList[5]; $filter_categorie = false; if (count($InfoFieldList) > 5 && ($InfoFieldList[5] != '')) { + $InfoFieldList[5] = (string) $InfoFieldList[5]; if ($InfoFieldList[0] == 'categorie') { $filter_categorie = true; // The combo list is a list of categories } else { @@ -1994,7 +1994,7 @@ class ExtraFields $sqlwhere .= ' WHERE 1=1'; } - if ($InfoFieldList[5] != '') { + if (count($InfoFieldList) > 5 && ($InfoFieldList[5] != '')) { // We have a filter on category for another table require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $tmpcategory = new Categorie($this->db); diff --git a/htdocs/core/lib/profid.lib.php b/htdocs/core/lib/profid.lib.php index a1f03735a65..bace12bdccc 100644 --- a/htdocs/core/lib/profid.lib.php +++ b/htdocs/core/lib/profid.lib.php @@ -57,7 +57,7 @@ function isValidLuhn($str) * @return boolean True if valid, False otherwise * @since Dolibarr V20 */ -function isValidSiren($siren, $lengthonly = false) +function isValidSiren($siren, $lengthonly = 0) { $siren = trim($siren); $siren = preg_replace('/(\s)/', '', $siren); @@ -78,7 +78,7 @@ function isValidSiren($siren, $lengthonly = false) * @return boolean True if valid, False otherwise * @since Dolibarr V20 */ -function isValidSiret($siret, $lengthonly = false) +function isValidSiret($siret, $lengthonly = 0) { $siret = trim($siret); $siret = preg_replace('/(\s)/', '', $siret); @@ -258,7 +258,7 @@ function isValidTinForES($str) * @param int $lenghtonly Make surface test only (length, ...) * @return int Return integer <=0 if KO, >0 if OK */ -function isValidProfIds($idprof, $thirdparty, $lenghtonly = false) +function isValidProfIds($idprof, $thirdparty, $lenghtonly = 0) { $ok = 1;