diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index e232539491b..7e8175793fd 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -75,7 +75,7 @@ if ($id) $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'rowid', $linkback); + dol_banner_tab($object, 'id', $linkback); print '
'; diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 902b773735a..651fa556e8a 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -111,6 +111,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes') $newdiscount1->description = $discount->description.' (1)'; $newdiscount2->description = $discount->description.' (2)'; } + $newdiscount1->fk_user = $discount->fk_user; $newdiscount2->fk_user = $discount->fk_user; $newdiscount1->fk_soc = $discount->fk_soc; @@ -121,7 +122,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes') $newdiscount2->datec = $discount->datec; $newdiscount1->tva_tx = $discount->tva_tx; $newdiscount2->tva_tx = $discount->tva_tx; - $newdiscount1->amount_ttc = $_POST["amount_ttc_1"]; + $newdiscount1->amount_ttc = $amount_ttc_1; $newdiscount2->amount_ttc = price2num($discount->amount_ttc - $newdiscount1->amount_ttc); $newdiscount1->amount_ht = price2num($newdiscount1->amount_ttc / (1 + $newdiscount1->tva_tx / 100), 'MT'); $newdiscount2->amount_ht = price2num($newdiscount2->amount_ttc / (1 + $newdiscount2->tva_tx / 100), 'MT'); diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 91c6ab23910..caea252c571 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * Copyright (C) 2018 Josep LluĂ­s Amador + * Copyright (C) 2020 Ferran Marcet * * 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 @@ -83,6 +84,7 @@ class box_contacts extends ModeleBoxes if ($user->rights->societe->lire && $user->rights->societe->contact->lire) { $sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc, sp.statut as status"; + $sql .= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile, sp.email as spemail"; $sql .= ", s.nom as socname, s.name_alias, s.email as semail"; $sql .= ", s.client, s.fournisseur, s.code_client, s.code_fournisseur"; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d2de83c18ce..f3ddd18f7b4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1301,7 +1301,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab $tabsname = str_replace("@", "", $picto); $out .= '
'; $out .= ''.$langs->trans("More").'... ('.$nbintab.')'; - $out .= '
'; + $out .= '
'; $out .= $outmore; $out .= '
'; $out .= '
'; diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index b811fe70abf..0c8f6fceca5 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -107,7 +107,7 @@ function dol_decode($chain, $key = '1') * If constant MAIN_SECURITY_SALT is defined, we use it as a salt (used only if hashing algorightm is something else than 'password_hash'). * * @param string $chain String to hash - * @param string $type Type of hash ('0':auto will use MAIN_SECURITY_HASH_ALGO else md5, '1':sha1, '2':sha1+md5, '3':md5, '4':md5 for OpenLdap, '5':sha256). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'. + * @param string $type Type of hash ('0':auto will use MAIN_SECURITY_HASH_ALGO else md5, '1':sha1, '2':sha1+md5, '3':md5, '4':md5 for OpenLdap with no salt, '5':sha256). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'. * @return string Hash of string * @see getRandomPassword() */ @@ -122,7 +122,7 @@ function dol_hash($chain, $type = '0') } // Salt value - if (!empty($conf->global->MAIN_SECURITY_SALT)) $chain = $conf->global->MAIN_SECURITY_SALT.$chain; + if (! empty($conf->global->MAIN_SECURITY_SALT) && $type != '4' && $type !== 'md5openldap') $chain = $conf->global->MAIN_SECURITY_SALT.$chain; if ($type == '1' || $type == 'sha1') return sha1($chain); elseif ($type == '2' || $type == 'sha1md5') return sha1(md5($chain));