From 44cc86bdd62d6aec3ebd897963e31bd7a63ec41d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Sep 2013 17:25:56 +1200 Subject: [PATCH] CRM/Core/BAO/UFField fix e-notice, CRM/Core fix comments --- CRM/Core/BAO/UFField.php | 8 ++++---- CRM/Utils/Weight.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CRM/Core/BAO/UFField.php b/CRM/Core/BAO/UFField.php index 048615cb22..fb779f7add 100644 --- a/CRM/Core/BAO/UFField.php +++ b/CRM/Core/BAO/UFField.php @@ -256,7 +256,7 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1"; $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); } /** @@ -282,7 +282,7 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1"; } /** - * 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 @@ -382,7 +382,7 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1"; } } - /* + /** * Function to find out whether given profile group using Activity * Profile fields with contact fields */ @@ -440,7 +440,7 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1"; /** * 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 diff --git a/CRM/Utils/Weight.php b/CRM/Utils/Weight.php index b29b814936..a5b2402166 100644 --- a/CRM/Utils/Weight.php +++ b/CRM/Utils/Weight.php @@ -108,7 +108,7 @@ class CRM_Utils_Weight { } /** - * 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 * -- 2.25.1