Fix for CRM-12431 urls not showing up
authorDeepak Srivastava <deepak.srivastava@webaccess.co.in>
Mon, 29 Apr 2013 14:51:29 +0000 (20:21 +0530)
committerDeepak Srivastava <deepak.srivastava@webaccess.co.in>
Mon, 29 Apr 2013 14:51:29 +0000 (20:21 +0530)
CRM/Report/Form/Contact/LoggingSummary.php

index e41d44d7dac6e91ccbae1e8a929623a9569b5da7..368128dbf84aef4d3fc9ccdf7be10c4c1510683a 100644 (file)
@@ -162,7 +162,7 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary {
           CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $row['log_civicrm_entity_altered_contact_id'], 'is_deleted') !== '0';
       }
 
-      if (CRM_Utils_Array::value($row, 'log_civicrm_entity_altered_contact') && 
+      if (CRM_Utils_Array::value('log_civicrm_entity_altered_contact', $row) && 
         !$isDeleted[$row['log_civicrm_entity_altered_contact_id']]) {
         $row['log_civicrm_entity_altered_contact_link'] = 
           CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=' . $row['log_civicrm_entity_altered_contact_id']);
@@ -174,27 +174,26 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary {
       $row['altered_by_contact_display_name_link'] = CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=' . $row['log_civicrm_entity_log_user_id']);
       $row['altered_by_contact_display_name_hover'] = ts("Go to contact summary");
 
-      if ($row['log_civicrm_entity_is_deleted'] and 'Update' == CRM_Utils_Array::value($row, 'log_civicrm_entity_log_action')) {
+      if ($row['log_civicrm_entity_is_deleted'] and 'Update' == CRM_Utils_Array::value('log_civicrm_entity_log_action', $row)) {
         $row['log_civicrm_entity_log_action'] = ts('Delete (to trash)');
       }
 
       if ('Contact' == CRM_Utils_Array::value('log_type', $this->_logTables[$row['log_civicrm_entity_log_type']]) && 
-          $row['log_civicrm_entity_log_action'] == 'Insert' ) {
+          CRM_Utils_Array::value('log_civicrm_entity_log_action', $row) == 'Insert' ) {
         $row['log_civicrm_entity_log_action'] = ts('Update');
       }
 
-      if (CRM_Utils_Array::value($row, 'log_civicrm_entity_log_action') && 
-        $newAction = $this->getEntityAction($row['log_civicrm_entity_id'], 
-                     $row['log_civicrm_entity_log_conn_id'], 
-                     $row['log_civicrm_entity_log_type'],
-                     $row['log_civicrm_entity_log_action']))
+      if ($newAction = $this->getEntityAction($row['log_civicrm_entity_id'], 
+                       $row['log_civicrm_entity_log_conn_id'], 
+                       $row['log_civicrm_entity_log_type'],
+                       CRM_Utils_Array::value('log_civicrm_entity_log_action', $row)))
         $row['log_civicrm_entity_log_action'] = $newAction;
 
       $row['log_civicrm_entity_log_type'] = $this->getLogType($row['log_civicrm_entity_log_type']);
 
       $date = CRM_Utils_Date::isoToMysql($row['log_civicrm_entity_log_date']);
 
-      if ('Update' == CRM_Utils_Array::value($row, 'log_civicrm_entity_log_action')) {
+      if ('Update' == CRM_Utils_Array::value('log_civicrm_entity_log_action', $row)) {
         $q = "reset=1&log_conn_id={$row['log_civicrm_entity_log_conn_id']}&log_date=". $date;
         if ($this->cid) {
           $q .= '&cid=' . $this->cid;