Minor tidy ups.
authorSaurabh Batra <saurabh.batra96@gmail.com>
Thu, 27 Apr 2017 22:34:10 +0000 (10:34 +1200)
committereileen <emcnaughton@wikimedia.org>
Thu, 27 Apr 2017 22:34:10 +0000 (10:34 +1200)
Fix comments. Remove unused function. The function has a mismatch between input & parameter so can never work

CRM/Core/BAO/UFField.php

index 46374aaee60e6dda7d7b405b0d9e3fe72bfad260..00bc96c9e1d76ba82937addde0ad3423980e95d2 100644 (file)
@@ -57,20 +57,6 @@ class CRM_Core_BAO_UFField extends CRM_Core_DAO_UFField {
     return CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_UFField', $params, $defaults);
   }
 
-  /**
-   * Get the form title.
-   *
-   * @param int $id
-   *   Id of uf_form.
-   *
-   * @return string
-   *   title
-   *
-   */
-  public static function getTitle($id) {
-    return CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFField', $groupId, 'title');
-  }
-
   /**
    * Update the is_active flag in the db.
    *
@@ -247,13 +233,13 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1";
    *   Set the is_active field.
    */
   public static function setUFField($customFieldId, $is_active) {
-    //find the profile id given custom field
+    // Find the profile id given custom field.
     $ufField = new CRM_Core_DAO_UFField();
     $ufField->field_name = "custom_" . $customFieldId;
 
     $ufField->find();
     while ($ufField->fetch()) {
-      //enable/ disable profile
+      // Enable/ disable profile.
       CRM_Core_BAO_UFField::setIsActive($ufField->id, $is_active);
     }
   }
@@ -315,7 +301,7 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1";
     $dao = CRM_Core_DAO::executeQuery($queryString, $p);
 
     while ($dao->fetch()) {
-      //enable/ disable profile
+      // Enable/ disable profile.
       CRM_Core_BAO_UFField::setUFField($dao->custom_field_id, $is_active);
     }
   }