CRM-16713 Find Contributions: Search by Premium
[civicrm-core.git] / CRM / Contribute / Form / Search.php
index d34a4ae25e3a270675f0bf9c2bf8a4a74b46fd82..a0e769d3cbf688ad52e8c19c0931456e46459855 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
 
   /**
-   * The params that are sent to the query
+   * The params that are sent to the query.
    *
    * @var array
    */
   protected $_queryParams;
 
   /**
-   * Are we restricting ourselves to a single contact
+   * Are we restricting ourselves to a single contact.
    *
    * @var boolean
    */
   protected $_single = FALSE;
 
   /**
-   * Are we restricting ourselves to a single contact
+   * Are we restricting ourselves to a single contact.
    *
    * @var boolean
    */
@@ -66,16 +66,16 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
   protected $_defaults;
 
   /**
-   * Prefix for the controller
+   * Prefix for the controller.
    */
   protected $_prefix = "contribute_";
 
   /**
-   * Processing needed for buildForm and later
+   * Processing needed for buildForm and later.
    *
    * @return void
    */
-  function preProcess() {
+  public function preProcess() {
     $this->set('searchFormName', 'Search');
 
     /**
@@ -169,7 +169,7 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
   }
 
   /**
-   * Build the form object
+   * Build the form object.
    *
    *
    * @return void
@@ -260,7 +260,7 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
 
     foreach (array(
                'contribution_amount_low',
-               'contribution_amount_high'
+               'contribution_amount_high',
              ) as $f) {
       if (isset($this->_formValues[$f])) {
         $this->_formValues[$f] = CRM_Utils_Rule::cleanMoney($this->_formValues[$f]);
@@ -274,7 +274,9 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
         'contribution_soft_credit_type_id',
         'contribution_status_id',
         'contribution_source',
-        'contribution_trxn_id'
+        'contribution_trxn_id',
+        'contribution_page_id',
+        'contribution_product_id',
       );
       foreach ($specialParams as $element) {
         $value = CRM_Utils_Array::value($element, $this->_formValues);
@@ -467,4 +469,5 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
   public function getTitle() {
     return ts('Find Contributions');
   }
+
 }