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:
commit
ec0c8e0c79
@ -75,7 +75,7 @@ if ($time >= $_SESSION['auto_check_events_not_before'])
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
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 = 'SELECT id';
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm a, '.MAIN_DB_PREFIX.'actioncomm_resources ar';
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm a, '.MAIN_DB_PREFIX.'actioncomm_resources ar';
|
||||||
|
|||||||
@ -166,6 +166,7 @@ class HookManager
|
|||||||
'doActions',
|
'doActions',
|
||||||
'doMassActions',
|
'doMassActions',
|
||||||
'formatEvent',
|
'formatEvent',
|
||||||
|
'formConfirm',
|
||||||
'formCreateThirdpartyOptions',
|
'formCreateThirdpartyOptions',
|
||||||
'formObjectOptions',
|
'formObjectOptions',
|
||||||
'formattachOptions',
|
'formattachOptions',
|
||||||
|
|||||||
@ -463,15 +463,18 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len
|
|||||||
{
|
{
|
||||||
$max = strlen($lowercase) - 1;
|
$max = strlen($lowercase) - 1;
|
||||||
for ($x = 0; $x < $nbofchar; $x++) {
|
for ($x = 0; $x < $nbofchar; $x++) {
|
||||||
$randomCode .= $lowercase[random_int(0, $max)];
|
$tmp = random_int(0, $max);
|
||||||
|
$randomCode .= $lowercase[$tmp];
|
||||||
}
|
}
|
||||||
$max = strlen($uppercase) - 1;
|
$max = strlen($uppercase) - 1;
|
||||||
for ($x = 0; $x < $nbofchar; $x++) {
|
for ($x = 0; $x < $nbofchar; $x++) {
|
||||||
$randomCode .= $uppercase[random_int(0, $max)];
|
$tmp = random_int(0, $max);
|
||||||
|
$randomCode .= $uppercase[$tmp];
|
||||||
}
|
}
|
||||||
$max = strlen($numbers) - 1;
|
$max = strlen($numbers) - 1;
|
||||||
for ($x = 0; $x < $nbofcharlast; $x++) {
|
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);
|
$generated_password = str_shuffle($randomCode);
|
||||||
@ -480,15 +483,18 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len
|
|||||||
{
|
{
|
||||||
$max = strlen($lowercase) - 1;
|
$max = strlen($lowercase) - 1;
|
||||||
for ($x = 0; $x < $nbofchar; $x++) {
|
for ($x = 0; $x < $nbofchar; $x++) {
|
||||||
$randomCode .= $lowercase[mt_rand(0, $max)];
|
$tmp = mt_rand(0, $max);
|
||||||
|
$randomCode .= $lowercase[$tmp];
|
||||||
}
|
}
|
||||||
$max = strlen($uppercase) - 1;
|
$max = strlen($uppercase) - 1;
|
||||||
for ($x = 0; $x < $nbofchar; $x++) {
|
for ($x = 0; $x < $nbofchar; $x++) {
|
||||||
$randomCode .= $uppercase[mt_rand(0, $max)];
|
$tmp = mt_rand(0, $max);
|
||||||
|
$randomCode .= $uppercase[$tmp];
|
||||||
}
|
}
|
||||||
$max = strlen($numbers) - 1;
|
$max = strlen($numbers) - 1;
|
||||||
for ($x = 0; $x < $nbofcharlast; $x++) {
|
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);
|
$generated_password = str_shuffle($randomCode);
|
||||||
@ -512,11 +518,13 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len
|
|||||||
$max = strlen($numbers) - 1;
|
$max = strlen($numbers) - 1;
|
||||||
if (function_exists('random_int')) // Cryptographic random
|
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
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -661,11 +661,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$larg_sign = ($this->page_largeur - $this->marge_gauche - $this->marge_droite) / 3;
|
$larg_sign = ($this->page_largeur - $this->marge_gauche - $this->marge_droite) / 3;
|
||||||
$pdf->Rect($this->marge_gauche, $posy + 1, $larg_sign, 25);
|
$pdf->Rect($this->marge_gauche, $posy + 1, $larg_sign, 25);
|
||||||
$pdf->SetXY($this->marge_gauche + 2, $posy + 2);
|
$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->Rect(2 * $larg_sign + $this->marge_gauche, $posy + 1, $larg_sign, 25);
|
||||||
$pdf->SetXY(2 * $larg_sign + $this->marge_gauche + 2, $posy + 2);
|
$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
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||||
|
|||||||
@ -482,6 +482,7 @@ if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
|
|||||||
print '<tr><td>' . $extrafields->attributes[$elementtype]['label'][$key];
|
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)) {
|
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 img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
|
|
||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) {
|
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 $formadvtargetemaling->advMultiselectarraySelllist('options_' . $key . '_cnct', $extrafields->attributes[$key]['param']['options'], $array_query['options_' . $key . '_cnct']);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
} else {
|
} else {
|
||||||
print '<table class="nobordernopadding"><tr>';
|
|
||||||
print '<td></td><td>';
|
|
||||||
if (is_array($array_query['options_' . $key . '_cnct'])) {
|
if (is_array($array_query['options_' . $key . '_cnct'])) {
|
||||||
print $extrafields->showInputField($key, implode(',', $array_query['options_' . $key . '_cnct']), '', '_cnct');
|
print $extrafields->showInputField($key, implode(',', $array_query['options_' . $key . '_cnct']), '', '_cnct');
|
||||||
} else {
|
} else {
|
||||||
print $extrafields->showInputField($key, $array_query['options_' . $key . '_cnct'], '', '_cnct');
|
print $extrafields->showInputField($key, $array_query['options_' . $key . '_cnct'], '', '_cnct');
|
||||||
}
|
}
|
||||||
print '</td></tr></table>';
|
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
}
|
}
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|||||||
@ -112,7 +112,7 @@ a.timeline-btn:hover
|
|||||||
{
|
{
|
||||||
background-color: #e7e7e7;
|
background-color: #e7e7e7;
|
||||||
color: #333;
|
color: #333;
|
||||||
border-color: #adadad;;
|
border-color: #adadad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user