$this->_activityTypeName = $activityTName[$this->_activityTypeId];
$this->assign('activityTName', $activityTName[$this->_activityTypeId]);
}
- }
-
- // Set title.
- if (isset($activityTName)) {
- $activityName = CRM_Utils_Array::value($this->_activityTypeId, $activityTName);
-
- if ($this->_currentlyViewedContactId) {
- $displayName = CRM_Contact_BAO_Contact::displayName($this->_currentlyViewedContactId);
- // Check if this is default domain contact CRM-10482.
- if (CRM_Contact_BAO_Contact::checkDomainContact($this->_currentlyViewedContactId)) {
- $displayName .= ' (' . ts('default organization') . ')';
+ // Set title.
+ if (isset($activityTName)) {
+ $activityName = CRM_Utils_Array::value($this->_activityTypeId, $activityTName);
+
+ if ($this->_currentlyViewedContactId) {
+ $displayName = CRM_Contact_BAO_Contact::displayName($this->_currentlyViewedContactId);
+ // Check if this is default domain contact CRM-10482.
+ if (CRM_Contact_BAO_Contact::checkDomainContact($this->_currentlyViewedContactId)) {
+ $displayName .= ' (' . ts('default organization') . ')';
+ }
+ CRM_Utils_System::setTitle($displayName . ' - ' . $activityName);
+ }
+ else {
+ CRM_Utils_System::setTitle(ts('%1 Activity', [1 => $activityName]));
}
- CRM_Utils_System::setTitle($displayName . ' - ' . $activityName);
- }
- else {
- CRM_Utils_System::setTitle(ts('%1 Activity', [1 => $activityName]));
}
}