Merge pull request #4709 from jitendrapurohit/webtestforCRM-15662
[civicrm-core.git] / CRM / Contact / Form / ProfileContact.php
index 1ddf0639615a4177ddaa4a9eef1938185ee7ff25..b6f12cbf5703130978171c2a2fb2859c98d964da 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$
  *
  */
@@ -39,6 +39,8 @@ class CRM_Contact_Form_ProfileContact {
   /**
    * Function to set variables up before form is built
    *
+   * @param $form
+   *
    * @return void
    * @access public
    */
@@ -76,8 +78,9 @@ class CRM_Contact_Form_ProfileContact {
    * Function to build form for honoree contact / on behalf of organization.
    *
    * @param $form              object  invoking Object
-   * @param $contactType       string  contact type
-   * @param $title             string  fieldset title
+   *
+   * @internal param string $contactType contact type
+   * @internal param string $title fieldset title
    *
    * @static
    */
@@ -108,9 +111,12 @@ class CRM_Contact_Form_ProfileContact {
     }
   }
 
+  /**
+   * @param $form
+   */
   static function postProcess($form) {
     $params = $form->_params;
-    if ($form->get('honor_block_is_active') && !empty($params['soft_credit_type_id'])) {
+    if (!empty($form->_honor_block_is_active) && !empty($params['soft_credit_type_id'])) {
       $honorId = null;
 
       //check if there is any duplicate contact