Ver Fonte

Fixed bug related to order of uninstall of Chado schemas. Fixed bug related to body field appearing on Tripal nodes

Stephen Ficklin há 10 anos atrás
pai
commit
a68b9af2f7

+ 3 - 0
tripal_analysis/tripal_analysis.module

@@ -262,6 +262,9 @@ function tripal_analysis_form_alter(&$form, &$form_state, $form_id) {
   // turn of preview button for insert/updates
   // turn of preview button for insert/updates
   if ($form_id == "chado_analysis_node_form") {
   if ($form_id == "chado_analysis_node_form") {
     $form['actions']['preview']['#access'] = FALSE;
     $form['actions']['preview']['#access'] = FALSE;
+    
+    //remove the body field
+    unset($form['body']);
   }
   }
 }
 }
 
 

+ 4 - 4
tripal_core/includes/tripal_core.chado_install.inc

@@ -171,10 +171,6 @@ function tripal_core_install_chado($action) {
 function tripal_core_reset_chado_schema() {
 function tripal_core_reset_chado_schema() {
 
 
   // drop current chado and chado-related schema
   // drop current chado and chado-related schema
-  if (chado_dbschema_exists('chado')) {
-    print "Dropping existing 'chado' schema\n";
-    db_query("drop schema chado cascade");
-  }
   if (chado_dbschema_exists('genetic_code')) {
   if (chado_dbschema_exists('genetic_code')) {
     print "Dropping existing 'genetic_code' schema\n";
     print "Dropping existing 'genetic_code' schema\n";
     db_query("drop schema genetic_code cascade");
     db_query("drop schema genetic_code cascade");
@@ -187,6 +183,10 @@ function tripal_core_reset_chado_schema() {
     print "Dropping existing 'frange' schema\n";
     print "Dropping existing 'frange' schema\n";
     db_query("drop schema frange cascade");
     db_query("drop schema frange cascade");
   }
   }
+  if (chado_dbschema_exists('chado')) {
+    print "Dropping existing 'chado' schema\n";
+    db_query("drop schema chado cascade");
+  }
 
 
   // create the new chado schema
   // create the new chado schema
   print "Creating 'chado' schema\n";
   print "Creating 'chado' schema\n";

+ 3 - 0
tripal_feature/tripal_feature.module

@@ -601,5 +601,8 @@ function tripal_feature_form_alter(&$form, &$form_state, $form_id) {
   // turn off preview button for insert/updates
   // turn off preview button for insert/updates
   if ($form_id == "chado_feature_node_form") {
   if ($form_id == "chado_feature_node_form") {
     $form['actions']['preview']['#access'] = FALSE;
     $form['actions']['preview']['#access'] = FALSE;
+    
+    //remove the body field
+    unset($form['body']);
   }
   }
 }
 }

+ 3 - 0
tripal_organism/tripal_organism.module

@@ -272,5 +272,8 @@ function tripal_organism_form_alter(&$form, &$form_state, $form_id) {
   // turn of preview button for insert/updates
   // turn of preview button for insert/updates
   if ($form_id == "chado_organism_node_form") {
   if ($form_id == "chado_organism_node_form") {
     $form['actions']['preview']['#access'] = FALSE;
     $form['actions']['preview']['#access'] = FALSE;
+    
+    //remove the body field
+    unset($form['body']);
   }
   }
 }
 }

+ 3 - 0
tripal_stock/tripal_stock.module

@@ -526,6 +526,9 @@ function tripal_stock_form_alter(&$form, &$form_state, $form_id) {
   // turn of preview button for insert/updates
   // turn of preview button for insert/updates
   if ($form_id == "chado_stock_node_form") {
   if ($form_id == "chado_stock_node_form") {
     $form['actions']['preview']['#access'] = FALSE;
     $form['actions']['preview']['#access'] = FALSE;
+    
+    //remove the body field
+    unset($form['body']);
   }
   }
 }
 }