/** * @param int $groupId * @param int $lookForType * @param string $lookForField * @return array array(contact_count, group_count) */ public function GetContactsAndGroupsCount($groupId, $lookForType, $lookForField) { $countArray = array(0, 0); if ($lookForField === '') { $countArray =& $this->_db->SelectAddressContactsAndGroupsCount($lookForType, $this->_account->IdUser); } else { if ($groupId == -1) { $countArray =& $this->_db->SelectAddressContactsAndGroupsCount($lookForType, $this->_account->IdUser, $lookForField); } else { $countArray =& $this->_db->SelectAddressContactsAndGroupsCount($lookForType, $this->_account->IdUser, $lookForField, $groupId); } if (!$this->_account->IsDemo) { $countArray[0] += $this->_db->SelectAccountsCountForEmailSharing($lookForType, $lookForField, $this->_account); } } return $countArray; }