// fix bug method addGroupsIfNoExist() in class Category
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10185 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
c58d04acc9
commit
4cc9dc04bf
1 file changed
+4
-7
@@ -971,13 +971,10 @@ class CategoryCore extends ObjectModel
|
|||||||
public function addGroupsIfNoExist($id_group)
|
public function addGroupsIfNoExist($id_group)
|
||||||
{
|
{
|
||||||
$groups = $this->getGroups();
|
$groups = $this->getGroups();
|
||||||
foreach ($groups as $group)
|
if (!in_array((int)$id_group, $groups))
|
||||||
{
|
return $this->addGroups(array((int)$id_group));
|
||||||
if ($group == $id_group)
|
else
|
||||||
return false;
|
return false;
|
||||||
else
|
|
||||||
return $this->addGroups(array((int)$id_group));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in new issue
Block a user