phpcs - Fix error, "CONST keyword must be lowercase; expected const but found CONST"
[civicrm-core.git] / CRM / Contact / Form / Domain.php
index b958f8fd27cb37dadc0fc748d739fc90bfeb68cb..3597bef86d722cb6e3f8d07b78568e1409153e01 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_Domain extends CRM_Core_Form {
 
   /**
-   * the group id, used when editing a group
+   * The group id, used when editing a group
    *
    * @var int
    */
   protected $_id;
 
   /**
-   * the contact_id of domain
+   * The contact_id of domain
    *
    * @var int
    */
   protected $_contactId;
 
   /**
-   * default from email address option value id.
+   * Default from email address option value id.
    *
    * @var int
    */
   protected $_fromEmailId = NULL;
 
   /**
-   * default location type fields
+   * Default location type fields
    *
    * @var array
    */
   protected $_locationDefaults = array();
 
   /**
-   * how many locationBlocks should we display?
+   * How many locationBlocks should we display?
    *
    * @var int
    * @const
    */
-  CONST LOCATION_BLOCKS = 1;
+  const LOCATION_BLOCKS = 1;
 
   function preProcess() {
     CRM_Utils_System::setTitle(ts('Organization Address and Contact Info'));
@@ -91,7 +91,7 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
   }
 
   /*
-   * This function sets the default values for the form.
+   * Set default values for the form.
    * the default values are retrieved from the database
    *
    * @access public
@@ -144,28 +144,13 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
         $defaults['address'][1]['state_province_id'] = $config->defaultContactStateProvince;
       }
 
-      if (!empty($defaults['address'])) {
-        foreach ($defaults['address'] as $key => $value) {
-          CRM_Contact_Form_Edit_Address::fixStateSelect($this,
-            "address[$key][country_id]",
-            "address[$key][state_province_id]",
-            "address[$key][county_id]",
-            CRM_Utils_Array::value('country_id', $value,
-              $config->defaultContactCountry
-            ),
-            CRM_Utils_Array::value('state_province_id', $value,
-              $config->defaultContactStateProvince
-            )
-          );
-        }
-      }
     }
     $defaults = array_merge($defaults, $domainDefaults);
     return $defaults;
   }
 
   /**
-   * Function to actually build the form
+   * Build the form object
    *
    * @return void
    * @access public
@@ -214,7 +199,7 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
   }
 
   /**
-   * global validation rules for the form
+   * Global validation rules for the form
    *
    * @param array $fields posted values of the form
    *