/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
/**
*
*/
- function __construct() {
+ public function __construct() {
$this->_columns = array(
'civicrm_contact' => array(
'dao' => 'CRM_Contact_DAO_Contact',
parent::__construct();
}
- function preProcess() {
+ public function preProcess() {
parent::preProcess();
}
*
* @return array
*/
- function setDefaultValues($freeze = TRUE) {
+ public function setDefaultValues($freeze = TRUE) {
return parent::setDefaultValues($freeze);
}
- function select() {
+ public function select() {
$select = array();
$append = NULL;
// since contact fields not related to financial type
/**
* @param bool $tableCol
*/
- function groupBy($tableCol = FALSE) {
+ public function groupBy($tableCol = FALSE) {
$this->_groupBy = "";
if (!empty($this->_params['group_bys']) &&
is_array($this->_params['group_bys'])
}
}
- function from() {
+ public function from() {
list($fromTable, $fromAlias, $fromCol) = $this->groupBy(TRUE);
$from = "$fromTable $fromAlias";
ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_phone']}.contact_id AND {$this->_aliases['civicrm_phone']}.is_primary = 1";
}
- else if ($fromTable == 'civicrm_financial_type') {
+ elseif ($fromTable == 'civicrm_financial_type') {
$contriCol = "financial_type_id";
}
elseif ($fromTable == 'civicrm_contribution') {
*
* @return mixed|string
*/
- function whereContribution($replaceAliasWith = 'contribution1') {
+ public function whereContribution($replaceAliasWith = 'contribution1') {
$clauses = array("is_test" => "{$this->_aliases['civicrm_contribution']}.is_test = 0");
foreach ($this->_columns['civicrm_contribution']['filters'] as $fieldName => $field) {
unset($clauses['receive_date1'], $clauses['total_amount1']);
}
- $whereClause = !empty($clauses) ?
- "WHERE " . implode(' AND ', $clauses) : '';
+ $whereClause = !empty($clauses) ? "WHERE " . implode(' AND ', $clauses) : '';
if ($replaceAliasWith) {
$whereClause = str_replace($this->_aliases['civicrm_contribution'], $replaceAliasWith, $whereClause);
return $whereClause;
}
- function where() {
+ public function where() {
if (!$this->_amountClauseWithAND) {
$this->_amountClauseWithAND =
"!({$this->_aliases['civicrm_contribution']}1.total_amount_count IS NULL AND {$this->_aliases['civicrm_contribution']}2.total_amount_count IS NULL)";
}
}
- $this->_where = !empty($clauses) ?
- "WHERE " . implode(' AND ', $clauses) : '';
+ $this->_where = !empty($clauses) ? "WHERE " . implode(' AND ', $clauses) : '';
}
/**
*
* @return array
*/
- static function formRule($fields, $files, $self) {
+ public static function formRule($fields, $files, $self) {
$errors = $checkDate = $errorCount = array();
*
* @return array
*/
- function statistics(&$rows) {
+ public function statistics(&$rows) {
$statistics = parent::statistics($rows);
//fetch contributions for both date ranges from pre-existing temp tables
return $statistics;
}
- function postProcess() {
+ public function postProcess() {
$this->beginPostProcess();
$create = $subSelect1 = $subSelect2 = NULL;
list($fromTable, $fromAlias, $fromCol) = $this->groupBy(TRUE);
/**
* @param $rows
*/
- function alterDisplay(&$rows) {
+ public function alterDisplay(&$rows) {
// custom code to alter rows
list($from1, $to1) = $this->getFromTo(CRM_Utils_Array::value("receive_date1_relative", $this->_params),
CRM_Utils_Array::value("receive_date1_from", $this->_params),
// foreach ends
}
}
-