Skip to content

Commit

Permalink
Merge pull request #10259 from eileenmcnaughton/caserc
Browse files Browse the repository at this point in the history
CRM-20424 remove call to deprecated function.
  • Loading branch information
eileenmcnaughton authored Apr 27, 2017
2 parents c85b067 + 972a604 commit 7958229
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CRM/Case/BAO/Case.php
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ public static function getCases($allCases = TRUE, $userID = NULL, $type = 'upcom
$condition .= " AND case_relationship.contact_id_b = {$userID} ";
}
if ($type == 'upcoming' || $type == 'any') {
$closedId = CRM_Core_OptionGroup::getValue('case_status', 'Closed', 'name');
$closedId = CRM_Core_PseudoConstant::getKey('CRM_Case_BAO_Case', 'case_status_id', 'Closed');
$condition .= "
AND civicrm_case.status_id != $closedId";
}
Expand Down
9 changes: 3 additions & 6 deletions CRM/Case/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,12 @@ public function creatNewShortcut(&$shortCuts) {
if (CRM_Core_Permission::check('access all cases and activities') ||
CRM_Core_Permission::check('add cases')
) {
$atype = CRM_Core_OptionGroup::getValue('activity_type',
'Open Case',
'name'
);
if ($atype) {
$activityType = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Open Case');
if ($activityType) {
$shortCuts = array_merge($shortCuts, array(
array(
'path' => 'civicrm/case/add',
'query' => "reset=1&action=add&atype=$atype&context=standalone",
'query' => "reset=1&action=add&atype={$activityType}&context=standalone",
'ref' => 'new-case',
'title' => ts('Case'),
),
Expand Down

0 comments on commit 7958229

Please sign in to comment.