Procházet zdrojové kódy

Made views integration warnings more descriptive and changed from drupal_set_message to watchdog

Lacey Sanderson před 12 roky
rodič
revize
b591152e64
1 změnil soubory, kde provedl 3 přidání a 4 odebrání
  1. 3 4
      tripal_views/tripal_views.api.inc

+ 3 - 4
tripal_views/tripal_views.api.inc

@@ -255,7 +255,7 @@ function tripal_views_integration_add_entry($defn_array) {
 
   }
   else {
-    drupal_set_message(t('Unable to set default views integration'), 'error');
+    drupal_set_message(t('Unable to set default tripal views integration'), 'error');
     $no_errors = FALSE;
   }
 
@@ -404,8 +404,7 @@ function tripal_views_get_integration_array_for_chado_table($table_name, $base_t
   );
   // Add fields
   if (!isset($schema['fields'])) {
-    $schema['fields'] = array();
-    watchdog('tripal_views', 'There are no fields defined for %table in the Chado Schema API.', array('%table' => $table_name), WATCHDOG_WARNING);
+    watchdog('tripal_views', 'There are no fields defined for %table in the Chado Schema API.', array('%table' => $table_name), WATCHDOG_NOTICE);
     return FALSE;
   }
   foreach ($schema['fields'] as $field_name => $field_schema) {
@@ -483,7 +482,7 @@ function tripal_views_get_integration_array_for_chado_table($table_name, $base_t
   // Add Joins to fields
   if (!isset($schema['foreign keys'])) {
     $schema['foreign keys'] = array();
-    drupal_set_message(t('There are no foreign keys defined for %table in the Chado Schema API.', array('%table' => $table_name)), 'warning');
+    watchdog('tripal_views','There are no foreign keys defined for %table in the Chado Schema API.', array('%table' => $table_name), WATCHDOG_WARNING);
   }
   foreach ($schema['foreign keys'] as $foreign_key_schema) {
     foreach ($foreign_key_schema['columns'] as $left_field => $right_field) {