Skip to content

Commit

Permalink
Merge branch 'develop' of [email protected]:Dolibarr/dolibarr.git into f…
Browse files Browse the repository at this point in the history
…ix_dev_multicompany_compatibility
  • Loading branch information
hregis committed Jan 14, 2025
2 parents 47a468c + ad36bda commit 2526e6f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 20 deletions.
8 changes: 4 additions & 4 deletions htdocs/contact/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Copyright (C) 2019-2024 Frédéric France <[email protected]>
* Copyright (C) 2019 Josep Lluís Amador <[email protected]>
* Copyright (C) 2020 Open-Dsi <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
* Copyright (C) 2024-2025 MDW <[email protected]>
* Copyright (C) 2024 Benjamin Falière <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -368,7 +368,7 @@
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
$search_all = "";
$search_id = '';
$search_ref = '';
$search_ref_ext = '';
$search_firstlast_only = "";
$search_lastname = "";
$search_firstname = "";
Expand Down Expand Up @@ -866,8 +866,8 @@
if ($search_id > 0) {
$param .= "&search_id=".((int) $search_id);
}
if ($search_ref) {
$param .= "&search_ref=".urlencode($search_ref);
if ($search_ref_ext) {
$param .= "&search_ref_ext=".urlencode($search_ref_ext);
}
if ($search_lastname != '') {
$param .= '&search_lastname='.urlencode($search_lastname);
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/actions_setmoduleoptions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
foreach ($arrayofparameters as $key => $val) {
// Modify constant only if key was posted (avoid resetting key to the null value)
if (GETPOSTISSET($key)) {
if (!empty($val['type']) && preg_match('/category:/', $val['type'])) {
if (isset($val['type']) && preg_match('/category:/', $val['type'])) {
if (GETPOSTINT($key) == '-1') {
$val_const = '';
} else {
$val_const = GETPOSTINT($key);
}
} elseif ($val['type'] == 'html') {
} elseif (isset($val['type']) && $val['type'] == 'html') {
$val_const = GETPOST($key, 'restricthtml');
} else {
$val_const = GETPOST($key, 'alpha');
Expand Down
21 changes: 11 additions & 10 deletions htdocs/core/lib/security.lib.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

/* Copyright (C) 2008-2021 Laurent Destailleur <[email protected]>
* Copyright (C) 2008-2021 Regis Houssin <[email protected]>
* Copyright (C) 2020 Ferran Marcet <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
* Copyright (C) 2024-2025 MDW <[email protected]>
*
* 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
Expand Down Expand Up @@ -234,15 +235,15 @@ function dolDecrypt($chain, $key = '')
* If constant MAIN_SECURITY_SALT is defined, we use it as a salt (used only if hashing algorithm is something else than 'password_hash').
*
* @param string $chain String to hash
* @param string $type Type of hash:
* 'auto' or '0': will use MAIN_SECURITY_HASH_ALGO else md5
* 'sha1' or '1': sha1
* 'sha1md5' or '2': sha1md5
* 'md5' or '3': md5
* 'openldapxxx' or '4': for OpenLdap
* 'sha256' or '5': sha256
* 'password_hash' or '6': password_hash
* Use 'md5' if hash is not needed for security purpose. For security need, prefer 'auto'.
* @param 'auto'|'0'|'sha1'|'1'|'sha1md5'|'2'|'md5'|'3'|'openldap'|'4'|'sha256'|'5'|'password_hash'|'6' $type Type of hash:
* 'auto' or '0': will use MAIN_SECURITY_HASH_ALGO else md5
* 'sha1' or '1': sha1
* 'sha1md5' or '2': sha1md5
* 'md5' or '3': md5
* 'openldapxxx' or '4': for OpenLdap
* 'sha256' or '5': sha256
* 'password_hash' or '6': password_hash
* Use 'md5' if hash is not needed for security purpose. For security need, prefer 'auto'.
* @param int $nosalt Do not include any salt
* @param int $mode 0=Return encoded password, 1=Return array with encoding password + encoding algorithm
* @return string|array{pass_encrypted:string,pass_encoding:string} Hash of string or array with pass_encrypted and pass_encoding
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/modules/DolibarrModules.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2753,8 +2753,8 @@ public function checkForCompliance($nametocheck = '')
$tmpfieldsofline = explode(';', $line);
$modulekey = strtolower($tmpfieldsofline[0]);
$conf->cache['noncompliantmodules'][$modulekey]['name'] = $tmpfieldsofline[0];
$conf->cache['noncompliantmodules'][$modulekey]['id'] = $tmpfieldsofline[1];
$conf->cache['noncompliantmodules'][$modulekey]['signature'] = $tmpfieldsofline[2];
$conf->cache['noncompliantmodules'][$modulekey]['id'] = (isset($tmpfieldsofline[1]) ? $tmpfieldsofline[1] : '');
$conf->cache['noncompliantmodules'][$modulekey]['signature'] = (isset($tmpfieldsofline[2]) ? $tmpfieldsofline[2] : '');
$conf->cache['noncompliantmodules'][$modulekey]['message'] = $langs->trans(empty($tmpfieldsofline[3]) ? 'WarningModuleAffiliatedToAReportedCompany' : $tmpfieldsofline[3]);
if (!empty($tmpfieldsofline[4])) {
$message2 = $langs->trans("WarningModuleAffiliatedToAPiratPlatform", '{s}');
Expand Down
4 changes: 2 additions & 2 deletions htdocs/public/eventorganization/attendee_new.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2021 Dorian Vabre <[email protected]>
* Copyright (C) 2023 Laurent Destailleur <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
* Copyright (C) 2024-2025 MDW <[email protected]>
* Copyright (C) 2024 Frédéric France <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -362,7 +362,7 @@ function llxFooterVierge()

// If the registration has already been paid for this attendee
if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) {
$securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, 'master');
$securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, 'md5');
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl);

$mesg = $langs->trans("RegistrationAndPaymentWereAlreadyRecorded", $email);
Expand Down

0 comments on commit 2526e6f

Please sign in to comment.