<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
* the contact and calls the appropriate type of page to view.
*
* @return void
- *
*/
public function preProcess() {
// process url params
}
// ensure that the id does exist
- if ( CRM_Core_DAO::getFieldValue( 'CRM_Contact_DAO_Contact', $this->_contactId, 'id' ) != $this->_contactId ) {
+ if (CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_contactId, 'id') != $this->_contactId) {
CRM_Core_Error::statusBounce(
ts('A Contact with that ID does not exist: %1', array(1 => $this->_contactId)),
CRM_Utils_System::url('civicrm/dashboard', 'reset=1')
// check logged in user permission
self::checkUserPermission($this);
- list($displayName, $contactImage,
- $contactType, $contactSubtype, $contactImageUrl
- ) = self::getContactDetails($this->_contactId);
+ list($displayName, $contactImage, $contactType, $contactSubtype, $contactImageUrl) = self::getContactDetails($this->_contactId);
$this->assign('displayName', $displayName);
$this->set('contactType', $contactType);
// Check if this is default domain contact CRM-10482
if (CRM_Contact_BAO_Contact::checkDomainContact($this->_contactId)) {
$this->assign('domainContact', TRUE);
- } else {
+ }
+ else {
$this->assign('domainContact', FALSE);
}
*
* @param int $contactId
*
- * @return array contact fields in fixed order
+ * @return array
+ * contact fields in fixed order
*/
public static function getContactDetails($contactId) {
return list($displayName,
$contactType,
$contactSubtype,
$contactImageUrl
- ) = CRM_Contact_BAO_Contact::getDisplayAndImage($contactId,
+ ) = CRM_Contact_BAO_Contact::getDisplayAndImage($contactId,
TRUE,
TRUE
- );
+ );
}
/**
$contactDetails[$contactId] = array(
'displayName' => $displayName,
'contactImage' => $contactImage,
+ 'isDeceased' => (bool) CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $contactId, 'is_deceased'),
);
}
else {
// set page title
$title = "{$contactImage} {$displayName}";
+ if ($contactDetails[$contactId]['isDeceased']) {
+ $title .= ' <span class="crm-contact-deceased">(deceased)</span>';
+ }
if ($isDeleted) {
$title = "<del>{$title}</del>";
}
}
/**
- * Add urls for display in the actions menu
+ * Add urls for display in the actions menu.
* @param CRM_Core_Page $obj
* @param int $cid
*/
$obj->assign('hookLinks', $hookLinks);
}
}
+
}