Browse Source

Quick little bug fixes + a warning message to users that chado is still needed for core with a link to where to install it.

Lacey Sanderson 9 years ago
parent
commit
c007fa5f70

+ 1 - 1
tripal_chado/includes/tripal_chado.term_storage.inc

@@ -50,7 +50,7 @@ function tripal_chado_vocab_get_term($namespace, $term_id) {
   return array(
     'id' => $cvterm->dbxref_id->accession,
     'name' => $cvterm->name,
-    'definition' => $cvterm->definition,
+    'definition' => (isset($cvterm->definition)) ? $cvterm->definition : '',
     'cvterm' => $cvterm,
   );
 }

+ 6 - 0
tripal_core/tripal_core.install

@@ -19,6 +19,12 @@ function tripal_core_install() {
       FOREIGN KEY (mview_id) REFERENCES {tripal_mviews} (mview_id)
       ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
   ');
+  
+  // Warn users that they need to install chado before installing anything else.
+  drupal_set_message(t(
+    'Tripal requires the <a href="!link">installation fo the Chado Schema</a> before any other modules can be installed.', 
+    array('!link' => url('admin/tripal/storage/chado/chado_install'))), 
+    'warning');
 }
 /**
  * Implementation of hook_schema().

+ 1 - 1
tripal_entities/api/tripal_entities.api.inc

@@ -282,7 +282,7 @@ function tripal_get_title_format($entity) {
  */
 function tripal_save_title_format($entity, $format) {
 
-  return tripal_bundle_save_variable('title_format', $entity->id, $format);
+  return tripal_set_bundle_variable('title_format', $entity->id, $format);
 }
 
 /**