diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index d3944b07f47..e5221bc4d01 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -916,31 +916,31 @@ class Form * \brief Retourne la liste déroulante de création en sous catégories possible * \param selected nombre de sous catégorie pré-sélectionnée */ - function select_nombre_sous_categorie($selected='', $nbcats=1) + function select_nombre_sous_categorie($selected='',$htmlname) { global $langs; $langs->load("categorie"); if ($selected) { - $categorie = new Categorie($db); + $categorie = new Categorie($this -> db); $nb = $categorie->get_nb_categories(); - - for ($i = 0 ; $i <= $nb ; $i++) - { - print ''; + for ($i = 0 ; $i <= $nb ; $i++) + { + print ''; - print ''; + else + print '>'; + + print $i.''; + } + print ''; } }