diff --git a/htdocs/categories/categorie.class.php b/htdocs/categories/categorie.class.php
index 1b9f66903c0..a64abd4f5bc 100644
--- a/htdocs/categories/categorie.class.php
+++ b/htdocs/categories/categorie.class.php
@@ -577,16 +577,23 @@ class Categorie
/**
* print_primary_way() affiche le chemin le plus court pour se rendre à un produit
*/
- function print_primary_way($id, $sep= " >> ")
+ function print_primary_way($id, $sep= " >> ",$url)
{
$primary_way = Array();
$way = $this->get_primary_way($id);
foreach ($way as $cat)
{
- $primary_way[] = "".$cat->label."";
+ if ($url == '')
+ {
+ $w[] = "".$cat->label."";
+ }
+ else
+ {
+ $w[] = "".$cat->label."";
+ }
}
- return implode($sep, $primary_way);
+ return implode($sep, $w);
}
/**