CRM/Core/BAO/UFField fix e-notice, CRM/Core fix comments
authorunknown <eileen@fuzion.co.nz>
Fri, 13 Sep 2013 05:25:56 +0000 (17:25 +1200)
committerunknown <eileen@fuzion.co.nz>
Fri, 13 Sep 2013 05:25:56 +0000 (17:25 +1200)
CRM/Core/BAO/UFField.php
CRM/Utils/Weight.php

index 048615cb228a490d4d995711d5b78f37122e397e..fb779f7add740783f8e033796890ef8d1beb50c7 100644 (file)
@@ -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
index b29b814936f5986b21d4b4370f14c57037e02766..a5b240216694300b6d394af0ee6a5315644d299d 100644 (file)
@@ -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
    *