X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FReport%2FForm%2FContribute%2FTopDonor.php;h=25297045f1ac476566f6e312972481bde8ec3757;hb=16e2e80cfacf49c5fcd1c47cb77ed35593aa0323;hp=51e71dce2654c9e1fa2a2a3f6fbaf51913b84bb5;hpb=cd061beab4edc81838d526d63d815d2d54320127;p=civicrm-core.git diff --git a/CRM/Report/Form/Contribute/TopDonor.php b/CRM/Report/Form/Contribute/TopDonor.php index 51e71dce26..25297045f1 100644 --- a/CRM/Report/Form/Contribute/TopDonor.php +++ b/CRM/Report/Form/Contribute/TopDonor.php @@ -45,6 +45,12 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { 'pieChart' => 'Pie Chart', ); + /** + * + */ + /** + * + */ function __construct() { $this->_columns = array( 'civicrm_contact' => @@ -160,24 +166,9 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { ), 'grouping' => 'phone-fields', ), - 'civicrm_group' => - array( - 'dao' => 'CRM_Contact_DAO_GroupContact', - 'alias' => 'cgroup', - 'filters' => - array( - 'gid' => - array( - 'name' => 'group_id', - 'title' => ts('Group'), - 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'group' => TRUE, - 'options' => CRM_Core_PseudoConstant::group(), - ), - ), - ), ); + $this->_groupFilter = TRUE; $this->_tagFilter = TRUE; $this->_currencyColumn = 'civicrm_contribution_currency'; parent::__construct(); @@ -240,6 +231,13 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { $this->_select = " SELECT * FROM ( SELECT " . implode(', ', $select) . " "; } + /** + * @param $fields + * @param $files + * @param $self + * + * @return array + */ static function formRule($fields, $files, $self) { $errors = array(); @@ -374,6 +372,9 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { $this->endPostProcess($rows); } + /** + * @param $groupID + */ function add2group($groupID) { if (is_numeric($groupID)) { @@ -394,10 +395,13 @@ ORDER BY civicrm_contribution_total_amount_sum DESC } } + /** + * @param int $rowCount + */ function limit($rowCount = CRM_Report_Form::ROW_COUNT_LIMIT) { // lets do the pager if in html mode $this->_limit = NULL; - + // CRM-14115, over-ride row count if rowCount is specified in URL if ($this->_dashBoardRowCount) { $rowCount = $this->_dashBoardRowCount; @@ -427,6 +431,9 @@ ORDER BY civicrm_contribution_total_amount_sum DESC } } + /** + * @param $rows + */ function alterDisplay(&$rows) { // custom code to alter rows