Skip to content

Commit

Permalink
just rename local var activityTName
Browse files Browse the repository at this point in the history
  • Loading branch information
demeritcowboy committed Aug 9, 2019
1 parent ee9f177 commit 6630f8f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CRM/Activity/Form/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,15 @@ public function preProcess() {

// Assigning Activity type name.
if ($this->_activityTypeId) {
$activityTName = CRM_Core_OptionGroup::values('activity_type', FALSE, FALSE, FALSE, 'AND v.value = ' . $this->_activityTypeId, 'label');
if ($activityTName[$this->_activityTypeId]) {
$this->_activityTypeName = $activityTName[$this->_activityTypeId];
$this->assign('activityTName', $activityTName[$this->_activityTypeId]);
$activityTypeDisplayLabels = CRM_Core_OptionGroup::values('activity_type', FALSE, FALSE, FALSE, 'AND v.value = ' . $this->_activityTypeId, 'label');
if ($activityTypeDisplayLabels[$this->_activityTypeId]) {
$this->_activityTypeName = $activityTypeDisplayLabels[$this->_activityTypeId];
// can't change this instance of activityTName yet - will come back to it dev/core#1116
$this->assign('activityTName', $activityTypeDisplayLabels[$this->_activityTypeId]);
}
// Set title.
if (isset($activityTName)) {
$activityName = CRM_Utils_Array::value($this->_activityTypeId, $activityTName);
if (isset($activityTypeDisplayLabels)) {
$activityName = CRM_Utils_Array::value($this->_activityTypeId, $activityTypeDisplayLabels);

if ($this->_currentlyViewedContactId) {
$displayName = CRM_Contact_BAO_Contact::displayName($this->_currentlyViewedContactId);
Expand Down

0 comments on commit 6630f8f

Please sign in to comment.