From 275b5d1f77fef674ae6c8a87d5506e2bcce38963 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 11 Feb 2020 07:32:29 +0100 Subject: [PATCH 1/8] FIX #10309 --- htdocs/core/lib/security.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 71d52f1bd9d..dc739220c07 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -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)); From f19f706c386e8dc4f123bea2b6e9453eeccb29d6 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 13 Feb 2020 07:55:52 +0100 Subject: [PATCH 2/8] FIX better check --- htdocs/core/lib/security.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index dc739220c07..483567aa3d0 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -122,7 +122,7 @@ function dol_hash($chain, $type = '0') } // Salt value - if (! empty($conf->global->MAIN_SECURITY_SALT) && ( ! $type == '4' || ! $type == 'md5openldap')) $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)); From 52506ddd05b3d73efec8b447aad32700b6c13186 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 13 Feb 2020 09:25:36 +0100 Subject: [PATCH 3/8] FIX can be a string or integer --- htdocs/core/lib/security.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 483567aa3d0..481339916a3 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -122,7 +122,7 @@ function dol_hash($chain, $type = '0') } // Salt value - if (! empty($conf->global->MAIN_SECURITY_SALT) && ($type !== '4' || $type !== 'md5openldap')) $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)); From 0ab0bb2e7de4049e17d7f801e63545f8acfb003c Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 14 Feb 2020 19:26:28 +0100 Subject: [PATCH 4/8] FIX wrong test --- htdocs/core/lib/security.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 481339916a3..1a8045df014 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -122,7 +122,7 @@ function dol_hash($chain, $type = '0') } // Salt value - if (! empty($conf->global->MAIN_SECURITY_SALT) && ($type != '4' || $type !== 'md5openldap')) $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)); From a7ca7dfbb639521bcb3d7bf6615c1b35364d4e72 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Thu, 20 Feb 2020 06:00:17 +0100 Subject: [PATCH 5/8] FIX: z-index for moretabsList with constant MAIN_MAXTABS_IN_CARD --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 9208ebb9a6e..ed50e236ffe 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1226,7 +1226,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.='
'; From 9ff424e23b63ef50ce3b52e67b33154dbe423aed Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Thu, 20 Feb 2020 11:45:46 +0100 Subject: [PATCH 6/8] FIX: Visualization rights correction on last modified contacts box --- htdocs/core/boxes/box_contacts.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 2d9d7e9461b..ebe7f8f9be0 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 @@ -90,7 +91,7 @@ class box_contacts extends ModeleBoxes $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid"; if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE sp.entity IN (".getEntity('socpeople').")"; - if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND sp.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($user->societe_id) $sql.= " AND sp.fk_soc = ".$user->societe_id; $sql.= " ORDER BY sp.tms DESC"; $sql.= $db->plimit($max, 0); From 559fc9f61ee0f471c1314c3261cd82c9eb05aab8 Mon Sep 17 00:00:00 2001 From: gmilad <61253440+gmilad@users.noreply.github.com> Date: Sat, 22 Feb 2020 13:07:25 +0100 Subject: [PATCH 7/8] Update note.php Fix : #13168 --- htdocs/adherents/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index c12c45de8b7..6d50ab58f88 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 '
'; From 0ab16ed5ae22727622035eba824e11c38d76eb7c Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 23 Feb 2020 16:50:24 +0100 Subject: [PATCH 8/8] Fix #10179 discount split --- htdocs/comm/remx.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index aa9307df8d2..4e8da77c5c0 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -121,7 +121,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');