// fix bug method addGroupsIfNoExist() in class Category

This commit is contained in:
lLefevre committed 2011-11-16 17:48:48 +00:00
1 parent 256571592d
commit e4b4548349
1 file changed
+4 -7
+4 -7
View File
@@ -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));
}
} }
/** /**