Browse Source

removed the default value because a return of false is being interpreted as nothing so it meant that the default of true was always being used

Shawna Spoor 6 years ago
parent
commit
75828daaf7

+ 1 - 1
tripal/includes/TripalEntityController.inc

@@ -689,7 +689,7 @@ class TripalEntityController extends EntityAPIController {
           else {
             // We only load via AJAX if empty fields are not hidden.
             $bundle = tripal_load_bundle_entity(array('name' => $bundle_name));
-            $hide_variable = tripal_get_bundle_variable('hide_empty_field', $bundle->id, TRUE);
+            $hide_variable = tripal_get_bundle_variable('hide_empty_field', $bundle->id);
             if (array_key_exists('settings', $instance) and
                 array_key_exists('auto_attach', $instance['settings']) and
                 $instance['settings']['auto_attach'] == FALSE and

+ 2 - 2
tripal/tripal.module

@@ -1524,7 +1524,7 @@ function tripal_field_display_TripalEntity_alter(&$display, $context){
 
   // Hide fields that are empty, but only if the hide_empty_field variable
   // is set to 'hide' for this bundel.
-  $hide_variable = tripal_get_bundle_variable('hide_empty_field', $bundle_info->id, TRUE);
+  $hide_variable = tripal_get_bundle_variable('hide_empty_field', $bundle_info->id);
   if($hide_variable == TRUE){
     $item = field_get_items('TripalEntity', $context['entity'], $field_name);
     if($item) {
@@ -1557,7 +1557,7 @@ function tripal_field_group_table_rows_alter(&$element, &$children) {
 
       // If the hide empty variable is turned on then remove fields from
       // the field group.
-      $hide_variable = tripal_get_bundle_variable('hide_empty_field', $bundle_info->id, TRUE);
+      $hide_variable = tripal_get_bundle_variable('hide_empty_field', $bundle_info->id);
       if($hide_variable == TRUE){
         $items = $element[$child]['#items'];
         // Case #1: there are no items.

+ 3 - 3
tripal_ws/includes/TripalWebService/TripalContentService_v0_1.inc

@@ -248,7 +248,7 @@ class TripalContentService_v0_1 extends TripalWebService {
 
     // If the entity is set to hide fields that have no values then we
     // want to honor that in the web services too.
-    $hide_fields = tripal_get_bundle_variable('hide_empty_field', $bundle->id, TRUE);
+    $hide_fields = tripal_get_bundle_variable('hide_empty_field', $bundle->id);
 
     // Get information about the fields attached to this bundle and sort them
     // in the order they were set for the display.
@@ -340,7 +340,7 @@ class TripalContentService_v0_1 extends TripalWebService {
 
     // If the entity is set to hide fields that have no values then we
     // want to honor that in the web services too.
-    $hide_fields = tripal_get_bundle_variable('hide_empty_field', $bundle->id, TRUE);
+    $hide_fields = tripal_get_bundle_variable('hide_empty_field', $bundle->id);
 
     // Get the field  settings.
     $field_name = $field['field_name'];
@@ -436,7 +436,7 @@ class TripalContentService_v0_1 extends TripalWebService {
 
     // If the entity is set to hide fields that have no values then we
     // want to honor that in the web services too.
-    $hide_fields = tripal_get_bundle_variable('hide_empty_field', $bundle->id, TRUE);
+    $hide_fields = tripal_get_bundle_variable('hide_empty_field', $bundle->id);
 
     $new_value = '';
     // If the value is an array rather than a scalar then map the sub elements