Merge pull request #2762 from amitajgaonkar/WebtestIssues
[civicrm-core.git] / CRM / Contact / Form / Task / AddToOrganization.php
index 139bfdbe5eaeb3a30ad0776045507815ebd87af2..d9451591e8032b13640c6e9a89e7da67b1534c0a 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | 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$
  *
  */
@@ -55,7 +55,7 @@ class CRM_Contact_Form_Task_AddToOrganization extends CRM_Contact_Form_Task {
    *
    * @access public
    *
-   * @return None
+   * @return void
    */
   function buildQuickForm() {
     CRM_Utils_System::setTitle(ts('Add Contacts to Organization'));
@@ -116,14 +116,14 @@ class CRM_Contact_Form_Task_AddToOrganization extends CRM_Contact_Form_Task {
    *
    * @access public
    *
-   * @return None
+   * @return void
    */
   public function postProcess() {
     // store the submitted values in an array
     $params = $this->controller->exportValues($this->_name);
 
     $this->set('searchDone', 0);
-    if (CRM_Utils_Array::value('_qf_AddToOrganization_refresh', $_POST)) {
+    if (!empty($_POST['_qf_AddToOrganization_refresh'])) {
       $searchParams['contact_type'] = array('Organization' => 'Organization');
       $searchParams['rel_contact'] = $params['name'];
       CRM_Contact_Form_Task_AddToHousehold::search($this, $searchParams);