),
'civicrm_contribution_page' => array(
'dao' => 'CRM_Contribute_DAO_ContributionPage',
+ 'alias' => 'cp',
'fields' => array(
'page_title' => array(
- 'title' => ts('Contribution Page Title'),
+ 'title' => ts('Page Title'),
'name' => 'title',
+ 'dbAlias' => 'coalesce(cp_civireport.title, e_civireport.title)',
'default' => TRUE,
),
),
),
'grouping' => 'pcp-fields',
),
+ 'civicrm_event' => array(
+ 'alias' => 'e',
+ 'filters' => array(
+ 'event_title' => array(
+ 'title' => ts('Event Title'),
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ ),
+ ),
+ 'grouping' => 'pcp-fields',
+ ),
'civicrm_pcp' => array(
'dao' => 'CRM_PCP_DAO_PCP',
'fields' => array(
'title' => ts('Personal Campaign Title'),
'default' => TRUE,
),
+ 'page_type' => array(
+ 'title' => ts('Page Type'),
+ 'default' => FALSE,
+ ),
'goal_amount' => array(
'title' => ts('Goal Amount'),
'type' => CRM_Utils_Type::T_MONEY,
LEFT JOIN civicrm_contribution_page {$this->_aliases['civicrm_contribution_page']}
ON {$this->_aliases['civicrm_pcp']}.page_id =
- {$this->_aliases['civicrm_contribution_page']}.id";
+ {$this->_aliases['civicrm_contribution_page']}.id
+ AND {$this->_aliases['civicrm_pcp']}.page_type = 'contribute'
+
+LEFT JOIN civicrm_event {$this->_aliases['civicrm_event']}
+ ON {$this->_aliases['civicrm_pcp']}.page_id =
+ {$this->_aliases['civicrm_event']}.id
+ AND {$this->_aliases['civicrm_pcp']}.page_type = 'event'";
// for credit card type
$this->addFinancialTrxnFromClause();
$entryFound = TRUE;
}
+ if (!empty($row['civicrm_pcp_page_type'])) {
+ $rows[$rowNum]['civicrm_pcp_page_type'] = ucfirst($rows[$rowNum]['civicrm_pcp_page_type']);
+ $entryFound = TRUE;
+ }
+
if (!$entryFound) {
break;
}