diff --git a/htdocs/admin/dolistore/ajax/image.php b/htdocs/admin/dolistore/ajax/image.php index ecba02c712c..52d3b97977e 100644 --- a/htdocs/admin/dolistore/ajax/image.php +++ b/htdocs/admin/dolistore/ajax/image.php @@ -1,6 +1,7 @@ . * Copyright (C) 2008-2011 Laurent Destailleur + * Copyright (C) 2020 Frédéric France * * This program is free software; you can redistribute it and/or modifyion 2.0 (the "License"); * it under the terms of the GNU General Public License as published bypliance with the License. @@ -17,6 +18,9 @@ */ if (!defined('REQUIRE_JQUERY_BLOCKUI')) define('REQUIRE_JQUERY_BLOCKUI', 1); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); +} /** diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index fcd3823b0c2..82e331eb623 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -5,7 +5,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2010-2014 Juanjo Menent + * Copyright (C) 2010-2020 Juanjo Menent * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2015-2019 Frédéric France * Copyright (C) 2015 Marcos García @@ -581,7 +581,7 @@ if ($object->id > 0) $boxstat .= ''; $boxstat .= '
'; - if (!empty($conf->propal->enabled)) + if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { // Box proposals $tmp = $object->getOutstandingProposals(); @@ -599,7 +599,7 @@ if ($object->id > 0) if ($link) $boxstat .= ''; } - if (!empty($conf->commande->enabled)) + if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { // Box commandes $tmp = $object->getOutstandingOrders(); @@ -617,7 +617,7 @@ if ($object->id > 0) if ($link) $boxstat .= ''; } - if (!empty($conf->facture->enabled)) + if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { // Box factures $tmp = $object->getOutstandingBills(); diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 61187f2e647..6b765d9451f 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -157,6 +157,7 @@ print '
'; $limit = 10; $sql = "SELECT m.rowid, m.titre, m.nbemail, m.statut, m.date_creat"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing as m"; +$sql .= " WHERE m.entity = ".$conf->entity; $sql .= " ORDER BY m.date_creat DESC"; $sql .= " LIMIT ".$limit; $result = $db->query($sql); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index eaeea9e3d43..522e8f5eaa3 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -468,7 +468,7 @@ if ($resql) print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit); $topicmail = "SendPropalRef"; - $modelmail = "proposal_send"; + $modelmail = "propal_send"; $objecttmp = new Propal($db); $trackid = 'pro'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 6f214d5d2eb..c726e1d8fed 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -5196,7 +5196,7 @@ elseif ($id > 0 || !empty($ref)) { if (!$objectidnext) { - print ''.$langs->trans("CreateCreditNote").''; + print ''.$langs->trans("CreateCreditNote").''; } } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 93061d200d8..078cfb2b5f2 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2759,7 +2759,7 @@ class Form } if (!empty($conf->barcode->enabled)) $sql .= ", pfp.barcode"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON ( p.rowid = pfp.fk_product AND pfp.entity IN (".getEntity('product').") )"; if ($socid) $sql .= " AND pfp.fk_soc = ".$socid; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid"; // Units diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index afd5830d4c1..1b36c35f0d4 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -3623,10 +3623,9 @@ function migrate_mode_reglement($db, $langs, $conf) * @param DoliDB $db Database handler * @param Translate $langs Object langs * @param Conf $conf Object conf - * @param string $versionto Version target * @return void */ -function migrate_clean_association($db, $langs, $conf, $versionto) +function migrate_clean_association($db, $langs, $conf) { $result = $db->DDLDescTable(MAIN_DB_PREFIX."categorie_association"); if ($result) // result defined for version 3.2 or - diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8e05aa34ab8..2beb4f74787 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2002,7 +2002,7 @@ function top_menu_search() $defaultAction = ''; $buttonList = '