From 0473bc5138e31459279fb478e8f56c524bf26c58 Mon Sep 17 00:00:00 2001
From: Florian HENRY <florian.henry@open-concept.pro>
Date: Mon, 1 Sep 2014 11:51:16 +0200
Subject: [PATCH] Fix missing $user into create call categorie

---
 htdocs/categories/class/categorie.class.php | 2 +-
 htdocs/categories/fiche.php                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index ad436d5c6c8..c4de7377ebd 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 aca14acce2b..a2f9dc54df2 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';
-- 
GitLab