Merge pull request #4012 from pradpnayak/CRM-15206
[civicrm-core.git] / CRM / Contribute / Form / UpdateBilling.php
index 88d4f22c69cad124f86ecffc20ca40fd327d8680..cf03cf65cdba391c490927fa3b0976d82b987b52 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -126,11 +126,22 @@ class CRM_Contribute_Form_UpdateBilling extends CRM_Core_Form {
     CRM_Contribute_BAO_ContributionRecur::setSubscriptionContext();
   }
 
+  /**
+   * This virtual function is used to set the default values of
+   * various form elements
+   *
+   * access        public
+   *
+   * @return array reference to the array of default values
+   *
+   */
+  /**
+   * @return array
+   */
   function setDefaultValues() {
     $this->_defaults = array();
 
     if ($this->_subscriptionDetails->contact_id) {
-      $options = array();
       $fields  = array();
       $names   = array(
         'first_name', 'middle_name', 'last_name', "street_address-{$this->_bltID}", "city-{$this->_bltID}",
@@ -160,16 +171,12 @@ class CRM_Contribute_Form_UpdateBilling extends CRM_Core_Form {
       }
     }
 
-
     $config = CRM_Core_Config::singleton();
     // set default country from config if no country set
     if (empty($this->_defaults["billing_country_id-{$this->_bltID}"])) {
       $this->_defaults["billing_country_id-{$this->_bltID}"] = $config->defaultContactCountry;
     }
 
-    // now fix all state country selectors
-    CRM_Core_BAO_Address::fixAllStateSelects($this, $this->_defaults);
-
     return $this->_defaults;
   }
 
@@ -205,9 +212,11 @@ class CRM_Contribute_Form_UpdateBilling extends CRM_Core_Form {
   /**
    * global form rule
    *
-   * @param array $fields  the input form values
-   * @param array $files   the uploaded files if any
-   * @param array $options additional user data
+   * @param array $fields the input form values
+   * @param array $files the uploaded files if any
+   * @param $self
+   *
+   * @internal param array $options additional user data
    *
    * @return true if no errors, else array of errors
    * @access public