CRM-18372 : dashboard notice error
authoryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 7 Apr 2016 06:12:26 +0000 (11:42 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 7 Apr 2016 06:12:26 +0000 (11:42 +0530)
----------------------------------------
* CRM-18372: dashboard notice error
  https://issues.civicrm.org/jira/browse/CRM-18372

CRM/PCP/BAO/PCP.php

index 9f3d8336a0939c7cb42e6942e54d9eeac3ebf046..882631e71c594b6c54c9c5f734cfd351d7acac56 100644 (file)
@@ -118,6 +118,7 @@ WHERE  civicrm_pcp.contact_id = civicrm_contact.id
 
     $query = "
 SELECT * FROM civicrm_pcp pcp
+LEFT JOIN civicrm_pcp_block block ON block.id = pcp.pcp_block_id
 WHERE pcp.is_active = 1
   AND pcp.contact_id = %1
 ORDER BY page_type, page_id";
@@ -135,6 +136,8 @@ ORDER BY page_type, page_id";
     $approved = CRM_Utils_Array::key('Approved', $pcpStatus);
 
     while ($pcpInfoDao->fetch()) {
+//crm_core_error::Debug($pcpInfoDao);
+
       $mask = $hide;
       if ($links) {
         $replace = array(
@@ -149,7 +152,7 @@ ORDER BY page_type, page_id";
 
       if ($pcpInfoDao->status_id != $approved || $pcpInfoDao->is_active != 1) {
         $class = 'disabled';
-        if (!$pcpInfoDao->tellfriend) {
+        if (!$pcpInfoDao->is_tellfriend_enabled) {
           $mask -= CRM_Core_Action::DETACH;
         }
       }