Merge pull request #1781 from GPCsolutions/categoriesfix
Fix categories creation
This commit is contained in:
commit
141895b904
@ -137,7 +137,7 @@ class Categorie extends CommonObject
|
|||||||
* -3 : categorie invalide
|
* -3 : categorie invalide
|
||||||
* -4 : category already exists
|
* -4 : category already exists
|
||||||
*/
|
*/
|
||||||
function create($user='')
|
function create($user)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$hookmanager;
|
global $conf,$langs,$hookmanager;
|
||||||
$langs->load('categories');
|
$langs->load('categories');
|
||||||
|
|||||||
@ -138,7 +138,7 @@ if ($action == 'add' && $user->rights->categorie->creer)
|
|||||||
// Create category in database
|
// Create category in database
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$result = $object->create();
|
$result = $object->create($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$action = 'confirmed';
|
$action = 'confirmed';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user