$oldWeight = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFField', $params['field_id'], 'weight', 'id');
}
$fieldValues = array('uf_group_id' => $params['group_id']);
- return CRM_Utils_Weight::updateOtherWeights('CRM_Core_DAO_UFField', $oldWeight, $params['weight'], $fieldValues);
+ return CRM_Utils_Weight::updateOtherWeights('CRM_Core_DAO_UFField', $oldWeight, CRM_Utils_Array::value('weight', $params, 0), $fieldValues);
}
/**
}
/**
- * Function to copy exisiting profile fields to
+ * Function to copy existing profile fields to
* new profile from the already built profile
*
* @param int $old_id from which we need to copy
}
}
- /*
+ /**
* Function to find out whether given profile group using Activity
* Profile fields with contact fields
*/
/**
* Function to find out whether given profile group uses $required
- * and/or $optionalprofile types
+ * and/or $optional profile types
*
* @param integer $ufGroupId profile id
* @param array $required array of types those are required
}
/**
- * Updates the weight fields of other rows according to the new and old weight paased in.
+ * Updates the weight fields of other rows according to the new and old weight passed in.
* And returns the new weight be used. If old-weight not present, Creates a gap for a new row to be inserted
* at the specified new weight
*