X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCase%2FBAO%2FCase.php;h=0fa87b459e92f0910c38cfc3f885a539934ffea0;hb=3a6d22e70a2bcb315e5c3fb562a15b0ff901bd5c;hp=02dd25698ebdda9b01a41a2c30c7d1f738114973;hpb=085430549e7b5841d1c955a7804bd28ec76258bf;p=civicrm-core.git diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index 02dd25698e..0fa87b459e 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -274,16 +274,16 @@ WHERE civicrm_case.id = %1"; * ID of the case. * * @param int $contactID + * @param int $startArrayAt This is to support legacy calls to Case.Get API which may rely on the first array index being set to 1 * * @return array */ - public static function retrieveContactIdsByCaseId($caseId, $contactID = NULL) { + public static function retrieveContactIdsByCaseId($caseId, $contactID = NULL, $startArrayAt = 0) { $caseContact = new CRM_Case_DAO_CaseContact(); $caseContact->case_id = $caseId; $caseContact->find(); $contactArray = array(); - // FIXME: Why does this return a 1-based array? - $count = 1; + $count = $startArrayAt; while ($caseContact->fetch()) { if ($contactID != $caseContact->contact_id) { $contactArray[$count] = $caseContact->contact_id; @@ -1090,7 +1090,6 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c $contactViewUrl = CRM_Utils_System::url("civicrm/contact/view", "reset=1&cid=", FALSE, NULL, FALSE); $hasViewContact = CRM_Core_Permission::giveMeAllACLs(); - $clientIds = self::retrieveContactIdsByCaseId($caseID); if (!$userID) { $session = CRM_Core_Session::singleton();