diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index d9a1928d021..d375a78aa9a 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2387,7 +2387,7 @@ class Product extends CommonObject $sql .= " c.entity IN (".getEntity('mo').")"; $sql .= " AND mp.fk_product =".$this->id; - $sql .= " AND mp.role ='".$role."'"; + $sql .= " AND mp.role ='".$this->db->escape($role)."'"; if ($socid > 0) { $sql .= " AND c.fk_soc = ".$socid; } diff --git a/htdocs/product/stats/bom.php b/htdocs/product/stats/bom.php index 4fd4586bb17..f2cd8dbf5d7 100644 --- a/htdocs/product/stats/bom.php +++ b/htdocs/product/stats/bom.php @@ -83,7 +83,7 @@ if ($id > 0 || !empty($ref)) $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); - dol_fiche_head($head, 'referers', $titre, -1, $picto); + print dol_get_fiche_head($head, 'referers', $titre, -1, $picto); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/product/stats/mo.php b/htdocs/product/stats/mo.php index d8dfa9053e8..54af6217831 100644 --- a/htdocs/product/stats/mo.php +++ b/htdocs/product/stats/mo.php @@ -85,7 +85,7 @@ if ($id > 0 || !empty($ref)) $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); - dol_fiche_head($head, 'referers', $titre, -1, $picto); + print dol_get_fiche_head($head, 'referers', $titre, -1, $picto); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint;