// 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);
}
// 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