CRM-15924 Fixed issue to allow more criteria rows than template does in report
authorpratikshad <pratiksha.dubey@webaccess.co.in>
Wed, 11 Feb 2015 05:42:38 +0000 (15:42 +1000)
committerpratikshad <pratiksha.dubey@webaccess.co.in>
Wed, 11 Feb 2015 05:42:38 +0000 (15:42 +1000)
----------------------------------------
* CRM-15924: Report form allows more criteria rows than template does
  https://issues.civicrm.org/jira/browse/CRM-15924

CRM/Report/Form.php

index 9404468a656e37f84c8b60aab3a7382a0d22b4ed..877e3b2f8f602438b314afaf17817e8bd13cb7eb 100644 (file)
@@ -815,8 +815,9 @@ class CRM_Report_Form extends CRM_Core_Form {
       }
 
       if (
-        array_key_exists('order_bys', $table) &&
-        is_array($table['order_bys'])
+        empty($this->_formValues['order_bys']) &&
+        (array_key_exists('order_bys', $table) &&
+        is_array($table['order_bys']))
       ) {
         if (!array_key_exists('order_bys', $this->_defaults)) {
           $this->_defaults['order_bys'] = array();