Merge branch '4.4' of https://github.com/civicrm/civicrm-core into 4.5
[civicrm-core.git] / CRM / Campaign / Form / Petition.php
index 76a5fa775d95f64bb4fba8b1a1bfa017d596dbc1..ac75ad73c055aae6d336aac217fe09676d33be92 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$
  *
  */
@@ -77,7 +77,7 @@ class CRM_Campaign_Form_Petition extends CRM_Core_Form {
     }
 
     // when custom data is included in this page
-    if (CRM_Utils_Array::value('hidden_custom', $_POST)) {
+    if (!empty($_POST['hidden_custom'])) {
       CRM_Custom_Form_CustomData::preProcess($this);
       CRM_Custom_Form_CustomData::buildQuickForm($this);
     }
@@ -341,13 +341,13 @@ WHERE  $whereClause
     if ($this->_surveyId) {
       CRM_Core_BAO_UFJoin::deleteAll($ufJoinParams);
     }
-    if (CRM_Utils_Array::value('profile_id', $params)) {
+    if (!empty($params['profile_id'])) {
       $ufJoinParams['weight'] = 1;
       $ufJoinParams['uf_group_id'] = $params['profile_id'];
       CRM_Core_BAO_UFJoin::create($ufJoinParams);
     }
 
-    if (CRM_Utils_Array::value('contact_profile_id', $params)) {
+    if (!empty($params['contact_profile_id'])) {
       $ufJoinParams['weight'] = 2;
       $ufJoinParams['uf_group_id'] = $params['contact_profile_id'];
       CRM_Core_BAO_UFJoin::create($ufJoinParams);