From 28c645354fbe96702fd428e55af390601adfa2da Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Thu, 4 May 2017 23:24:43 +0530 Subject: [PATCH] fix test failures --- CRM/Contact/Page/DedupeFind.php | 2 +- CRM/Event/BAO/Participant.php | 3 +-- CRM/PCP/Page/PCP.php | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CRM/Contact/Page/DedupeFind.php b/CRM/Contact/Page/DedupeFind.php index 012529f882..0646f0f7f7 100644 --- a/CRM/Contact/Page/DedupeFind.php +++ b/CRM/Contact/Page/DedupeFind.php @@ -61,7 +61,7 @@ class CRM_Contact_Page_DedupeFind extends CRM_Core_Page_Basic { $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 0); $context = CRM_Utils_Request::retrieve('context', 'String', $this); $limit = CRM_Utils_Request::retrieve('limit', 'Integer', $this); - $rgid = CRM_Utils_Request::retrieve('rgid', 'Positive'); + $rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this); $urlQry = array( 'reset' => 1, 'rgid' => $rgid, diff --git a/CRM/Event/BAO/Participant.php b/CRM/Event/BAO/Participant.php index 492ece8ccb..eb6fc33e74 100644 --- a/CRM/Event/BAO/Participant.php +++ b/CRM/Event/BAO/Participant.php @@ -2209,8 +2209,7 @@ WHERE (entity_table = 'civicrm_participant' AND entity_id = {$participantId} AND $date = CRM_Utils_Date::currentDBDate(); $event = CRM_Event_BAO_Event::getEvents(0, $eventId); - $eventTitle = $event[$eventId]; - $subject = "Registration selections changed for $eventTitle"; + $subject = sprintf("Registration selections changed for %s", CRM_Utils_Array::value($eventId, $event)); $targetCid = $contactId; $srcRecId = $participantId; diff --git a/CRM/PCP/Page/PCP.php b/CRM/PCP/Page/PCP.php index c7255ffb5f..e3512ee7c3 100644 --- a/CRM/PCP/Page/PCP.php +++ b/CRM/PCP/Page/PCP.php @@ -214,7 +214,7 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic { } } - $approvedId = CRM_Core_OptionGroup::getValue('pcp_status', 'Approved', 'name'); + $approvedId = CRM_Core_PseudoConstant::getKey('CRM_PCP_BAO_PCP', 'status_id', 'Approved'); //check for delete CRM-4418 $allowToDelete = CRM_Core_Permission::check('delete in CiviContribute'); -- 2.25.1