From: jitendrapurohit Date: Wed, 16 Mar 2016 10:17:11 +0000 (+0530) Subject: QA fix for CRM-18183 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ecc6bd607ed365e13b82b36317ed01c60a62f704;p=civicrm-core.git QA fix for CRM-18183 --- diff --git a/CRM/Contact/Form/CustomData.php b/CRM/Contact/Form/CustomData.php index 04b6819906..2275cd9f7f 100644 --- a/CRM/Contact/Form/CustomData.php +++ b/CRM/Contact/Form/CustomData.php @@ -156,7 +156,7 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form { // when custom data is included in this page if (!empty($_POST['hidden_custom'])) { for ($i = 0; $i <= $_POST['hidden_custom_group_count'][$this->_groupID]; $i++) { - CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->_contactSubType, $i, $this->_contactType, $this->_groupID); + CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->_contactSubType, $i, $this->_contactType, $this->_tableID); CRM_Custom_Form_CustomData::buildQuickForm($this); CRM_Custom_Form_CustomData::setDefaultValues($this); } diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index a562a1c1d4..013e21cb3b 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -1635,11 +1635,11 @@ SELECT id // rename this file to go into the secure directory only if // user has uploaded new file not existing verfied on the basis of $fileID - if (!$fileID && !rename($fName, $config->customFileUploadDir . $filename)) { + if (empty($fileID) && !rename($fName, $config->customFileUploadDir . $filename)) { CRM_Core_Error::statusBounce(ts('Could not move custom file to custom upload directory')); } - if ($customValueId && !$fileID) { + if ($customValueId && empty($fileID)) { $query = " SELECT $columnName FROM $tableName