// this function is expensive and should be sparingly used if groupIDs is empty
if (empty($groupIDs)) {
$groupIDClause = null;
- $groupIDs = array( );
+ $groupIDs = array();
}
else {
if (!is_array($groupIDs)) {
if ($groupID == NULL) {
$invoked = TRUE;
- } else if (is_array($groupID)) {
+ }
+ elseif (is_array($groupID)) {
foreach ($groupID as $gid) {
unset(self::$_alreadyLoaded[$gid]);
}
- } else if ($groupID && array_key_exists($groupID, self::$_alreadyLoaded)) {
+ }
+ elseif ($groupID && array_key_exists($groupID, self::$_alreadyLoaded)) {
unset(self::$_alreadyLoaded[$groupID]);
}
$prevContactID = $dao->contact_id;
if (!array_key_exists($dao->contact_id, $contactGroup)) {
$contactGroup[$dao->contact_id] =
- array( 'group' => array(), 'groupTitle' => array());
+ array('group' => array(), 'groupTitle' => array());
}
$contactGroup[$dao->contact_id]['group'][] =
'id' => $dao->group_id,
'title' => $dao->title,
'description' => $dao->description,
- 'children' => $dao->children
+ 'children' => $dao->children,
);
$contactGroup[$dao->contact_id]['groupTitle'][] = $dao->title;
}