Browse Source

rename method to not clash with hook

Vlad Dracula 7 years ago
parent
commit
17dd70bedf
2 changed files with 3 additions and 12 deletions
  1. 1 6
      tripal_ds/api/tripal_ds.pane.api.inc
  2. 2 6
      tripal_ds/tripal_ds.module

+ 1 - 6
tripal_ds/api/tripal_ds.pane.api.inc

@@ -31,12 +31,7 @@
  *  field_create_instance($instance);
  *  tripal_ds_field_create_field($field_label, $field, $bundle);
  */
-function tripal_ds_field_create_field($field_label, $field_name, $bundle_name) {
-
-  if (isset($field_name['field_name'])){
-    $field_name = $field_name['field_name'];
-  }
-
+function tripal_ds_field_create_field_but_not_the_hook($field_label, $field_name, $bundle_name) {
 
   $field_name = str_replace(' ', '_', strtolower($field_name));
   //Build the rest of the passes parameters.

+ 2 - 6
tripal_ds/tripal_ds.module

@@ -381,12 +381,8 @@ function tripal_ds_pane_addition_button_form_submit($form, &$form_state) {
   //Build the rest of the passed variables.
   $field_name = $form_state['input']['field_name'];
   $field_label = $form_state['input']['field_name'];
-
-  if (!$field_name){
-    return;
-  }
-
-  tripal_ds_field_create_field($field_label, $field_name, $bundle_name);
+  
+  tripal_ds_field_create_field_but_not_the_hook($field_label, $field_name, $bundle_name);
   drupal_goto("admin/structure/bio_data/manage/$bundle_name/display");
 }