diff --git a/htdocs/core/ajax/check_notifications.php b/htdocs/core/ajax/check_notifications.php index d8f4985f6d8..ebbea4ffc35 100644 --- a/htdocs/core/ajax/check_notifications.php +++ b/htdocs/core/ajax/check_notifications.php @@ -75,7 +75,7 @@ if ($time >= $_SESSION['auto_check_events_not_before']) require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; - dol_syslog('NEW $_SESSION[auto_check_events_not_before]='.$_SESSION['auto_check_events_not_before']); + dol_syslog('NEW $_SESSION[auto_check_events_not_before]='.(empty($_SESSION['auto_check_events_not_before']) ? '' : $_SESSION['auto_check_events_not_before'])); $sql = 'SELECT id'; $sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm a, '.MAIN_DB_PREFIX.'actioncomm_resources ar'; diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index e24bce5e247..1f3f2ef3fcf 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -166,6 +166,7 @@ class HookManager 'doActions', 'doMassActions', 'formatEvent', + 'formConfirm', 'formCreateThirdpartyOptions', 'formObjectOptions', 'formattachOptions', diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index ce346c0d26e..c320ead1391 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -463,15 +463,18 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len { $max = strlen($lowercase) - 1; for ($x = 0; $x < $nbofchar; $x++) { - $randomCode .= $lowercase[random_int(0, $max)]; + $tmp = random_int(0, $max); + $randomCode .= $lowercase[$tmp]; } $max = strlen($uppercase) - 1; for ($x = 0; $x < $nbofchar; $x++) { - $randomCode .= $uppercase[random_int(0, $max)]; + $tmp = random_int(0, $max); + $randomCode .= $uppercase[$tmp]; } $max = strlen($numbers) - 1; for ($x = 0; $x < $nbofcharlast; $x++) { - $randomCode .= $numbers[random_int(0, $max)]; + $tmp = random_int(0, $max); + $randomCode .= $numbers[$tmp]; } $generated_password = str_shuffle($randomCode); @@ -480,15 +483,18 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len { $max = strlen($lowercase) - 1; for ($x = 0; $x < $nbofchar; $x++) { - $randomCode .= $lowercase[mt_rand(0, $max)]; + $tmp = mt_rand(0, $max); + $randomCode .= $lowercase[$tmp]; } $max = strlen($uppercase) - 1; for ($x = 0; $x < $nbofchar; $x++) { - $randomCode .= $uppercase[mt_rand(0, $max)]; + $tmp = mt_rand(0, $max); + $randomCode .= $uppercase[$tmp]; } $max = strlen($numbers) - 1; for ($x = 0; $x < $nbofcharlast; $x++) { - $randomCode .= $numbers[mt_rand(0, $max)]; + $tmp = mt_rand(0, $max); + $randomCode .= $numbers[$tmp]; } $generated_password = str_shuffle($randomCode); @@ -512,11 +518,13 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len $max = strlen($numbers) - 1; if (function_exists('random_int')) // Cryptographic random { - $generated_password = str_replace($replaceambiguouschars, $numbers[random_int(0, $max)], $generated_password); + $tmp = random_int(0, $max); + $generated_password = str_replace($replaceambiguouschars, $numbers[$tmp], $generated_password); } else { - $generated_password = str_replace($replaceambiguouschars, $numbers[mt_rand(0, $max)], $generated_password); + $tmp = random_int(0, $max); + $generated_password = str_replace($replaceambiguouschars, $numbers[$tmp], $generated_password); } } diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php index cda16561f8d..b50ba6522db 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -661,11 +661,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder $larg_sign = ($this->page_largeur - $this->marge_gauche - $this->marge_droite) / 3; $pdf->Rect($this->marge_gauche, $posy + 1, $larg_sign, 25); $pdf->SetXY($this->marge_gauche + 2, $posy + 2); - $pdf->MultiCell($larg_sign, 2, $outputlangs->trans("For").' '.$outputlangs->convToOutputCharset($mysoc->name).":", '', 'L'); + $pdf->MultiCell($larg_sign, 2, $outputlangs->transnoentities("For") . ' ' . $outputlangs->convToOutputCharset($mysoc->name) . ":", '', 'L'); $pdf->Rect(2 * $larg_sign + $this->marge_gauche, $posy + 1, $larg_sign, 25); $pdf->SetXY(2 * $larg_sign + $this->marge_gauche + 2, $posy + 2); - $pdf->MultiCell($larg_sign, 2, $outputlangs->trans("ForCustomer").':', '', 'L'); + $pdf->MultiCell($larg_sign, 2, $outputlangs->transnoentities("ForCustomer").':', '', 'L'); } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index 245cd4f7f00..f2378ce5e4f 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -482,6 +482,7 @@ if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { print '' . $extrafields->attributes[$elementtype]['label'][$key]; if ($array_query['options_' . $key . '_cnct'] != '' || (is_array($array_query['options_' . $key . '_cnct']) && count($array_query['options_' . $key . '_cnct']) > 0)) { print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); + } print ''; if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { @@ -519,14 +520,11 @@ if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { print $formadvtargetemaling->advMultiselectarraySelllist('options_' . $key . '_cnct', $extrafields->attributes[$key]['param']['options'], $array_query['options_' . $key . '_cnct']); print '' . "\n"; } else { - print ''; - print '
'; if (is_array($array_query['options_' . $key . '_cnct'])) { print $extrafields->showInputField($key, implode(',', $array_query['options_' . $key . '_cnct']), '', '_cnct'); } else { print $extrafields->showInputField($key, $array_query['options_' . $key . '_cnct'], '', '_cnct'); } - print '
'; print '' . "\n"; } print '' . "\n"; diff --git a/htdocs/theme/eldy/timeline.inc.php b/htdocs/theme/eldy/timeline.inc.php index eb13821c221..d5fba863b3d 100644 --- a/htdocs/theme/eldy/timeline.inc.php +++ b/htdocs/theme/eldy/timeline.inc.php @@ -112,7 +112,7 @@ a.timeline-btn:hover { background-color: #e7e7e7; color: #333; - border-color: #adadad;; + border-color: #adadad; }