CRM-16119: Fix incorrect usages of ts().
[civicrm-core.git] / CRM / Contact / Form / DedupeRules.php
index c769b42037ca83552239dde70c4b27df047a4543..8730474ac92d8946634ed0b5177f8cc2459113bf 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -45,7 +45,7 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form {
   protected $_rgid;
 
   /**
-   * Pre processing
+   * Pre processing.
    *
    * @return void
    */
@@ -94,7 +94,7 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form {
   }
 
   /**
-   * Build the form object
+   * Build the form object.
    *
    * @return void
    */
@@ -140,7 +140,7 @@ 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.
@@ -148,8 +148,8 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form {
    * @param $files
    * @param $self
    *
-   * @return array list of errors to be posted back to the form
-   * @static
+   * @return array
+   *   list of errors to be posted back to the form
    */
   public static function formRule($fields, $files, $self) {
     $errors = array();
@@ -187,7 +187,7 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form {
   }
 
   /**
-   * Process the form submission
+   * Process the form submission.
    *
    *
    * @return void
@@ -217,11 +217,11 @@ UPDATE civicrm_dedupe_rule_group
       $rgDao->id = $this->_rgid;
     }
 
-    $rgDao->title        = $values['title'];
-    $rgDao->is_reserved  = CRM_Utils_Array::value('is_reserved', $values, FALSE);
-    $rgDao->used         = $values['used'];
+    $rgDao->title = $values['title'];
+    $rgDao->is_reserved = CRM_Utils_Array::value('is_reserved', $values, FALSE);
+    $rgDao->used = $values['used'];
     $rgDao->contact_type = $this->_contactType;
-    $rgDao->threshold    = $values['threshold'];
+    $rgDao->threshold = $values['threshold'];
     $rgDao->save();
 
     // make sure name is set only during insert
@@ -284,7 +284,15 @@ UPDATE civicrm_dedupe_rule_group
 
         if ($dao->fetch()) {
           // set the length to null for all the fields where prefix length is not supported. eg. int,tinyint,date,enum etc dataTypes.
-          if ($dao->COLUMN_NAME == $field && !in_array($dao->DATA_TYPE, array('char', 'varchar', 'binary', 'varbinary', 'text', 'blob'))) {
+          if ($dao->COLUMN_NAME == $field && !in_array($dao->DATA_TYPE, array(
+                'char',
+                'varchar',
+                'binary',
+                'varbinary',
+                'text',
+                'blob',
+              ))
+          ) {
             $length = NULL;
           }
           elseif ($dao->COLUMN_NAME == $field && !empty($dao->CHARACTER_MAXIMUM_LENGTH) && ($length > $dao->CHARACTER_MAXIMUM_LENGTH)) {
@@ -309,4 +317,5 @@ UPDATE civicrm_dedupe_rule_group
 
     CRM_Core_Session::setStatus(ts("The rule '%1' has been saved.", array(1 => $rgDao->title)), ts('Saved'), 'success');
   }
+
 }