/** * Protected support method for getMyHolds. * * Fetch both local and remote holds. Remote hold data will be augmented using * the API. * * @param array $patron Patron data for use in an sql query * * @return array Keyed data for use in an sql query */ protected function getMyHoldsSQL($patron) { // Most of our SQL settings will be identical to the parent class.... $sqlArray = parent::getMyHoldsSQL($patron); // Add remote holds; MFHD_ITEM and BIB_TEXT entries will be bogus for these, // but we'll deal with them later in getMyHolds() $sqlArray['expressions'][] = "NVL(VOYAGER_DATABASES.DB_CODE, 'LOCAL') as DB_CODE"; // We need to significantly change the where clauses to account for remote // holds $sqlArray['where'] = ["HOLD_RECALL.PATRON_ID = :id", "HOLD_RECALL.HOLD_RECALL_ID = HOLD_RECALL_ITEMS.HOLD_RECALL_ID(+)", "HOLD_RECALL_ITEMS.ITEM_ID = MFHD_ITEM.ITEM_ID(+)", "(HOLD_RECALL_ITEMS.HOLD_RECALL_STATUS IS NULL OR " . "HOLD_RECALL_ITEMS.HOLD_RECALL_STATUS < 3)", "HOLD_RECALL.BIB_ID = BIB_TEXT.BIB_ID(+)", "HOLD_RECALL.REQUEST_GROUP_ID = REQUEST_GROUP.GROUP_ID(+)", "HOLD_RECALL.HOLDING_DB_ID = VOYAGER_DATABASES.DB_ID(+)"]; return $sqlArray; }