diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index d74fc667072..19d7d96ffa7 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -918,14 +918,16 @@ class Form */ function select_nombre_sous_categorie($selected='', $nbcats=1) { - global $conf,$langs; + global $langs; $langs->load("categorie"); + + if ($selected) + { + $categorie = new Categorie($this->$db); + $nb = $categorie->get_nb_categories(); - $categorie = new Categorie($db); - $nb = $categorie->get_nb_categories(); - - for ($i = 0 ; $i <= $nb ; $i++) - { + for ($i = 0 ; $i <= $nb ; $i++) + { print ''; - } + } + } } /**