notice and format fixes
authormonishdeb <monish.deb@webaccessglobal.com>
Fri, 18 Sep 2015 13:44:57 +0000 (19:14 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Fri, 18 Sep 2015 13:44:57 +0000 (19:14 +0530)
CRM/Report/Form.php
CRM/Report/Form/Event/ParticipantListCount.php

index 84129769d2d2674e1f6e5b800fb96b3a76e652f3..af72c422ecdb369995e622b2af71460aca0759ee 100644 (file)
@@ -2683,8 +2683,8 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
    */
   public function groupBy() {
     $groupBys = array();
-    if (is_array($this->_params['group_bys']) &&
-      !empty($this->_params['group_bys'])
+    if (!empty($this->_params['group_bys']) &&
+      is_array($this->_params['group_bys'])
     ) {
       foreach ($this->_columns as $tableName => $table) {
         if (array_key_exists('group_bys', $table)) {
index 98fc91d949f1f2ebf839b5173285e147d1db59c7..9eb0ec4efebbe47fa5d0faac399803e30ba9bc38 100644 (file)
@@ -465,13 +465,12 @@ class CRM_Report_Form_Event_ParticipantListCount extends CRM_Report_Form_Event {
     $this->_whereClauses[] = "{$this->_aliases['civicrm_participant']}.is_test = 0";
   }
 
-  // We override this function because we use GROUP functions in the 
-  // SELECT clause, therefore we have to group by *something*. If the
-  // user doesn't select a column to group by, we should group by 
-  // participant id.
   public function groupBy() {
+    // We override this function because we use GROUP functions in the
+    // SELECT clause, therefore we have to group by *something*. If the
+    // user doesn't select a column to group by, we should group by participant id.
     parent::groupBy();
-    if(empty($this->_groupBy)) {
+    if (empty($this->_groupBy)) {
       $this->_groupBy = "GROUP BY {$this->_aliases['civicrm_participant']}.id";
     }
   }