phpcs - Fix error, "CONST keyword must be lowercase; expected const but found CONST"
[civicrm-core.git] / CRM / Contact / Form / DedupeRules.php
index e8030241338561a99105512ac3b9426194c807cd..29c26761295ea37e948bc711cbddf8bc775bc7fa 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  *
  */
 class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form {
-  CONST RULES_COUNT = 5;
+  const RULES_COUNT = 5;
   protected $_contactType;
   protected $_defaults = array();
   protected $_fields = array();
   protected $_rgid;
 
   /**
-   * Function to pre processing
+   * Pre processing
    *
    * @return void
    * @access public
@@ -95,7 +95,7 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form {
   }
 
   /**
-   * Function to build the form
+   * Build the form object
    *
    * @return void
    * @access public
@@ -142,10 +142,13 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form {
   }
 
   /**
-   * global validation rules for the form
+   * Global validation rules for the form
    *
    * @param array $fields posted values of the form
    *
+   * @param $files
+   * @param $self
+   *
    * @return array list of errors to be posted back to the form
    * @static
    * @access public
@@ -171,12 +174,23 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form {
     return empty($errors) ? TRUE : $errors;
   }
 
+  /**
+   * Set default values for the form. MobileProvider that in edit/view mode
+   * the default values are retrieved from the database
+   *
+   * @access public
+   *
+   * @return array
+   */
+  /**
+   * @return array
+   */
   function setDefaultValues() {
     return $this->_defaults;
   }
 
   /**
-   * Function to process the form
+   * Process the form submission
    *
    * @access public
    *
@@ -196,7 +210,7 @@ UPDATE civicrm_dedupe_rule_group
    AND used = %2";
       $queryParams = array(
         1 => array($this->_contactType, 'String'),
-        2 => array($this->_options[$used], 'String'),
+        2 => array($values['used'], 'String'),
       );
 
       CRM_Core_DAO::executeQuery($query, $queryParams);