$this->from();
$this->customDataFrom();
$this->where();
+ if (array_key_exists('civicrm_contribution', $this->getVar('_columns'))) {
+ $this->getPermissionedFTQuery($this);
+ }
$this->groupBy();
$this->orderBy();
FROM civicrm_contact {$this->_aliases['civicrm_contact']} {$this->_aclFrom}
INNER JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']}
ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_contribution']}.contact_id AND {$this->_aliases['civicrm_contribution']}.is_test = 0";
- $this->getPermissionedFTQuery($this);
if (CRM_Utils_Array::value('contribution_or_soft_value', $this->_params) ==
'both'
{$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_email']}.contact_id AND
{$this->_aliases['civicrm_email']}.is_primary = 1\n ";
}
- $this->getPermissionedFTQuery($this);
}
public function where() {
public function beginPostProcessCommon() {
$this->buildQuery();
// @todo this acl has no test coverage and is very hard to test manually so could be fragile.
- $this->getPermissionedFTQuery($this);
$this->resetFormSqlAndWhereHavingClauses();
$this->contactTempTable = 'civicrm_report_temp_lybunt_c_' . date('Ymd_') . uniqid();
{$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_email']}.contact_id AND
{$this->_aliases['civicrm_email']}.is_primary = 1\n ";
}
- $this->getPermissionedFTQuery($this);
}
public function where() {
ON {$this->_aliases['civicrm_batch']}.entity_id = eft.financial_trxn_id AND
{$this->_aliases['civicrm_batch']}.entity_table = 'civicrm_financial_trxn'\n";
}
- $this->getPermissionedFTQuery($this);
}
/**
// get ready with post process params
$this->beginPostProcess();
$this->buildACLClause($this->_aliases['civicrm_contact']);
- $this->select();
- $this->from();
- $this->where();
- $this->groupBy();
- $this->getPermissionedFTQuery($this);
+ $this->buildQuery();
$rows = $contactIds = array();
if (empty($this->_params['charts'])) {
// get the acl clauses built before we assemble the query
$this->buildACLClause($this->_aliases['civicrm_contact']);
- $this->select();
-
- $this->from();
- $this->getPermissionedFTQuery($this);
-
- $this->where();
-
- $this->groupBy();
-
- $this->limit();
+ $this->buildQuery();
//set the variable value rank, rows = 0
$setVariable = " SET @rows:=0, @rank=0 ";