diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index ad436d5c6c8b331846ab71a3ec5bad5d679d369c..c4de7377ebddab82ef26b39d5400863e18ac4b05 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -137,7 +137,7 @@ class Categorie extends CommonObject * -3 : categorie invalide * -4 : category already exists */ - function create($user='') + function create($user) { global $conf,$langs,$hookmanager; $langs->load('categories'); diff --git a/htdocs/categories/fiche.php b/htdocs/categories/fiche.php index aca14acce2bc171fa0c7488527b72ef06b906e84..a2f9dc54df2dfa96105188f1aa99c36b04a6bcce 100644 --- a/htdocs/categories/fiche.php +++ b/htdocs/categories/fiche.php @@ -138,7 +138,7 @@ if ($action == 'add' && $user->rights->categorie->creer) // Create category in database if (! $error) { - $result = $object->create(); + $result = $object->create($user); if ($result > 0) { $action = 'confirmed';