Просмотр исходного кода

Fixed bug in feature views_data hook that kept chado_XXXX tables from being integrated if the priority wasn't 9

spficklin 12 лет назад
Родитель
Сommit
cb89cc0237

+ 7 - 1
tripal_analysis/tripal_analysis.views.inc

@@ -35,7 +35,13 @@ function tripal_analysis_views_data()  {
   if (module_exists('tripal_views')) {
     // Base Table: Analysis
     $tablename = 'analysis';
-    if (!tripal_views_is_integrated($tablename, 9)) {
+    // get the setup with the lightest priority. That's the table 
+    // that currently integrated with views.
+    $priority = tripal_views_get_lightest_priority_setup($tablename);
+      
+    // check to see if the table is integrated. If it is then integrate it's
+    // corresponding 'chado_[table]' table.
+    if (!tripal_views_is_integrated($tablename, $priority)) {
       $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, TRUE);
 
       // Make table-specific modifications

+ 7 - 1
tripal_library/tripal_library.views.inc

@@ -35,7 +35,13 @@ function tripal_library_views_data()  {
       'library'
     );
     foreach ($tables as $tablename) {
-      if (!tripal_views_is_integrated($tablename, 9)) {
+    	// get the setup with the lightest priority. That's the table 
+      // that currently integrated with views.
+      $priority = tripal_views_get_lightest_priority_setup($tablename);
+      
+      // check to see if the table is integrated. If it is then integrate it's
+      // corresponding 'chado_[table]' table.
+      if (!tripal_views_is_integrated($tablename, $priority)) {
         $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, TRUE);
 
         // Add in node relationships if chado is in the same db as drupal

+ 7 - 1
tripal_organism/tripal_organism.views.inc

@@ -36,7 +36,13 @@ function tripal_organism_views_data()  {
       'organism'
     );
     foreach ($tables as $tablename) {
-      if (!tripal_views_is_integrated($tablename, 9)) {
+    	// get the setup with the lightest priority. That's the table 
+      // that currently integrated with views.
+      $priority = tripal_views_get_lightest_priority_setup($tablename);
+      
+      // check to see if the table is integrated. If it is then integrate it's
+      // corresponding 'chado_[table]' table.
+      if (!tripal_views_is_integrated($tablename, $priority)) {
         $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, TRUE);
 
         // Add specialty handlers

+ 7 - 1
tripal_project/tripal_project.views.inc

@@ -28,7 +28,13 @@ function tripal_project_views_data()  {
       'project'
     );
     foreach ($tables as $tablename) {
-      if (!tripal_views_is_integrated($tablename, 9)) {
+    	// get the setup with the lightest priority. That's the table 
+      // that currently integrated with views.
+      $priority = tripal_views_get_lightest_priority_setup($tablename);
+      
+      // check to see if the table is integrated. If it is then integrate it's
+      // corresponding 'chado_[table]' table.
+      if (!tripal_views_is_integrated($tablename, $priority)) {
         $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, TRUE);
 
         // Add in node relationships if chado is in the same db as drupal

+ 7 - 1
tripal_stock/tripal_stock.views.inc

@@ -33,7 +33,13 @@ function tripal_stock_views_data()  {
 
   if (module_exists('tripal_views')) {
     $tablename = 'stock';
-    if (!tripal_views_is_integrated($tablename, 9)) {
+    // get the setup with the lightest priority. That's the table 
+    // that currently integrated with views.
+    $priority = tripal_views_get_lightest_priority_setup($tablename);
+      
+    // check to see if the table is integrated. If it is then integrate it's
+    // corresponding 'chado_[table]' table.
+    if (!tripal_views_is_integrated($tablename, $priority)) {
       $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, TRUE);
 
       // Add in node relationships if chado is in the same db as drupal