Преглед изворни кода

Fixed a bug where all export displays were appearing in the download form. We only want those that are attched to the display to show up for that display

Stephen Ficklin пре 12 година
родитељ
комит
25d1f14d92
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7 0
      tripal_views/tripal_views.views.inc

+ 7 - 0
tripal_views/tripal_views.views.inc

@@ -719,8 +719,15 @@ function tripal_views_data_export_download_form(&$form_state, $view, $display_id
   $displays = $view->display;
   $displays = $view->display;
   $options = array();
   $options = array();
   $default = '';
   $default = '';
+  $current_display = $view->current_display;
   foreach ($displays as $name => $display) {
   foreach ($displays as $name => $display) {
     if (preg_match("/^views_data_export/", $name)) {
     if (preg_match("/^views_data_export/", $name)) {
+    
+      // only add this display to the form if it is attached 
+      $display_options = $display->display_options;
+      if(strcmp($display_options['displays'][$current_display],$current_display)!=0){
+         continue;
+      } 
 
 
       // set the first item as default
       // set the first item as default
       if (!$default) {
       if (!$default) {