forked from Wavyzz/dolibarr
Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts: htdocs/comm/remx.php htdocs/core/boxes/box_contacts.php htdocs/core/lib/functions.lib.php htdocs/core/lib/security.lib.php
This commit is contained in:
@@ -75,7 +75,7 @@ if ($id)
|
|||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'rowid', $linkback);
|
dol_banner_tab($object, 'id', $linkback);
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
|||||||
$newdiscount1->description = $discount->description.' (1)';
|
$newdiscount1->description = $discount->description.' (1)';
|
||||||
$newdiscount2->description = $discount->description.' (2)';
|
$newdiscount2->description = $discount->description.' (2)';
|
||||||
}
|
}
|
||||||
|
|
||||||
$newdiscount1->fk_user = $discount->fk_user;
|
$newdiscount1->fk_user = $discount->fk_user;
|
||||||
$newdiscount2->fk_user = $discount->fk_user;
|
$newdiscount2->fk_user = $discount->fk_user;
|
||||||
$newdiscount1->fk_soc = $discount->fk_soc;
|
$newdiscount1->fk_soc = $discount->fk_soc;
|
||||||
@@ -121,7 +122,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
|||||||
$newdiscount2->datec = $discount->datec;
|
$newdiscount2->datec = $discount->datec;
|
||||||
$newdiscount1->tva_tx = $discount->tva_tx;
|
$newdiscount1->tva_tx = $discount->tva_tx;
|
||||||
$newdiscount2->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);
|
$newdiscount2->amount_ttc = price2num($discount->amount_ttc - $newdiscount1->amount_ttc);
|
||||||
$newdiscount1->amount_ht = price2num($newdiscount1->amount_ttc / (1 + $newdiscount1->tva_tx / 100), 'MT');
|
$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');
|
$newdiscount2->amount_ht = price2num($newdiscount2->amount_ttc / (1 + $newdiscount2->tva_tx / 100), 'MT');
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||||
|
* Copyright (C) 2020 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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)
|
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 = "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 .= ", 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.nom as socname, s.name_alias, s.email as semail";
|
||||||
$sql .= ", s.client, s.fournisseur, s.code_client, s.code_fournisseur";
|
$sql .= ", s.client, s.fournisseur, s.code_client, s.code_fournisseur";
|
||||||
|
|||||||
@@ -1301,7 +1301,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
|||||||
$tabsname = str_replace("@", "", $picto);
|
$tabsname = str_replace("@", "", $picto);
|
||||||
$out .= '<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
|
$out .= '<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
|
||||||
$out .= '<a href="#" class="tab moretab inline-block tabunactive reposition">'.$langs->trans("More").'... ('.$nbintab.')</a>';
|
$out .= '<a href="#" class="tab moretab inline-block tabunactive reposition">'.$langs->trans("More").'... ('.$nbintab.')</a>';
|
||||||
$out .= '<div id="moretabsList'.$tabsname.'" style="position: absolute; '.$left.': -999em; text-align: '.$left.'; margin:0px; padding:2px">';
|
$out .= '<div id="moretabsList'.$tabsname.'" style="position: absolute; '.$left.': -999em; text-align: '.$left.'; margin:0px; padding:2px; z-index:10;">';
|
||||||
$out .= $outmore;
|
$out .= $outmore;
|
||||||
$out .= '</div>';
|
$out .= '</div>';
|
||||||
$out .= '<div></div>';
|
$out .= '<div></div>';
|
||||||
|
|||||||
@@ -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').
|
* 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 $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
|
* @return string Hash of string
|
||||||
* @see getRandomPassword()
|
* @see getRandomPassword()
|
||||||
*/
|
*/
|
||||||
@@ -122,7 +122,7 @@ function dol_hash($chain, $type = '0')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Salt value
|
// 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);
|
if ($type == '1' || $type == 'sha1') return sha1($chain);
|
||||||
elseif ($type == '2' || $type == 'sha1md5') return sha1(md5($chain));
|
elseif ($type == '2' || $type == 'sha1md5') return sha1(md5($chain));
|
||||||
|
|||||||
Reference in New Issue
Block a user