Merge pull request #7220 from ucam-dar/CRM-17556
[civicrm-core.git] / CRM / Core / BAO / CustomGroup.php
index dd6c801514d0169123d34c59c565e0385d5577a4..232e59f797bca8922eee68a6e5f0f4df08f74344 100644 (file)
@@ -1297,9 +1297,12 @@ ORDER BY civicrm_custom_group.weight,
           continue;
         }
 
-        if (!empty($field['element_name'])) {
-          $elementName = $field['element_name'];
+        if (empty($field['element_name'])) {
+          continue;
         }
+
+        $elementName = $field['element_name'];
+
         switch ($field['html_type']) {
           case 'Multi-Select':
           case 'AdvMulti-Select':
@@ -1729,6 +1732,9 @@ ORDER BY civicrm_custom_group.weight,
       case 'Contribution':
         return 'civicrm_contribution';
 
+      case 'ContributionRecur':
+        return 'civicrm_contribution_recur';
+
       case 'Relationship':
         return 'civicrm_relationship';