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

Conflicts:
	htdocs/core/lib/security2.lib.php
	htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
	htdocs/core/tpl/advtarget.tpl.php
This commit is contained in:
Laurent Destailleur 2020-10-30 03:35:40 +01:00
commit ec0c8e0c79
6 changed files with 22 additions and 15 deletions

View File

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

View File

@ -166,6 +166,7 @@ class HookManager
'doActions',
'doMassActions',
'formatEvent',
'formConfirm',
'formCreateThirdpartyOptions',
'formObjectOptions',
'formattachOptions',

View File

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

View File

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

View File

@ -482,6 +482,7 @@ if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
print '<tr><td>' . $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 '</td><td>';
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 '</td><td>' . "\n";
} else {
print '<table class="nobordernopadding"><tr>';
print '<td></td><td>';
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 '</td></tr></table>';
print '</td><td>' . "\n";
}
print '</td></tr>' . "\n";

View File

@ -112,7 +112,7 @@ a.timeline-btn:hover
{
background-color: #e7e7e7;
color: #333;
border-color: #adadad;;
border-color: #adadad;
}