comment fixes
[civicrm-core.git] / CRM / Contact / Page / View.php
index 433601177bef37e6f9396bcc353e6dae7d966c11..449c0c2f0485845c6d5eba3d4b4264c497eb967b 100644 (file)
@@ -1,9 +1,9 @@
 <?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.                                    |
  |                                                                    |
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2015
  */
 
 /**
  * Main page for viewing contact.
- *
  */
 class CRM_Contact_Page_View extends CRM_Core_Page {
 
@@ -68,10 +65,9 @@ class CRM_Contact_Page_View extends CRM_Core_Page {
   protected $_permission;
 
   /**
-   * Heart of the viewing process. The runner gets all the meta data for
-   * the contact and calls the appropriate type of page to view.
+   * Heart of the viewing process.
    *
-   * @return void
+   * The runner gets all the meta data for the contact and calls the appropriate type of page to view.
    */
   public function preProcess() {
     // process url params
@@ -322,6 +318,7 @@ class CRM_Contact_Page_View extends CRM_Core_Page {
       $contactDetails[$contactId] = array(
         'displayName' => $displayName,
         'contactImage' => $contactImage,
+        'isDeceased' => (bool) CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $contactId, 'is_deceased'),
       );
     }
     else {
@@ -331,6 +328,9 @@ class CRM_Contact_Page_View extends CRM_Core_Page {
 
     // set page title
     $title = "{$contactImage} {$displayName}";
+    if ($contactDetails[$contactId]['isDeceased']) {
+      $title .= '  <span class="crm-contact-deceased">(deceased)</span>';
+    }
     if ($isDeleted) {
       $title = "<del>{$title}</del>";
     }