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

This commit is contained in:
Laurent Destailleur 2023-03-10 19:16:54 +01:00
commit 6c743f34b6
4 changed files with 12 additions and 9 deletions

View File

@ -6090,13 +6090,15 @@ abstract class CommonObject
// If field is a computed field, value must become result of compute (regardless of whether a row exists
// in the element's extrafields table)
foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) {
if (!empty($extrafields->attributes[$this->table_element]) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) {
//var_dump($conf->disable_compute);
if (empty($conf->disable_compute)) {
global $objectoffield; // We set a global variable to $objectoffield so
$objectoffield = $this; // we can use it inside computed formula
$this->array_options["options_".$key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, '');
if (is_array($extrafields->attributes[$this->table_element]['label'])) {
foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) {
if (!empty($extrafields->attributes[$this->table_element]) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) {
//var_dump($conf->disable_compute);
if (empty($conf->disable_compute)) {
global $objectoffield; // We set a global variable to $objectoffield so
$objectoffield = $this; // we can use it inside computed formula
$this->array_options['options_' . $key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, '');
}
}
}
}

View File

@ -257,7 +257,7 @@ function dol_verifyHash($chain, $hash, $type = '0')
global $conf;
if ($type == '0' && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_verify')) {
if ($hash[0] == '$') {
if (! empty($hash[0]) && $hash[0] == '$') {
return password_verify($chain, $hash);
} elseif (strlen($hash) == 32) {
return dol_verifyHash($chain, $hash, '3'); // md5

View File

@ -363,6 +363,7 @@ if (count($typeleaves) == 0) {
print_liste_field_titre((empty($user->rights->holiday->define_holiday) ? '' : 'Note'), $_SERVER["PHP_SELF"]);
print_liste_field_titre('');
$selectedfields = '';
if ($massactionbutton) {
$selectedfields = $form->showCheckAddButtons('checkforselect', 1);
}

View File

@ -839,7 +839,7 @@ if ($search_project_user > 0) {
$param .= '&search_project_user='.urlencode($search_project_user);
}
if ($search_project_contact != '') {
$param .= '&search_project_user='.urlencode($search_project_contact);
$param .= '&search_project_contact='.urlencode($search_project_contact);
}
if ($search_sale > 0) {
$param .= '&search_sale='.urlencode($search_sale);