function tripal_views_init

2.x tripal_views.module tripal_views_init()
1.x tripal_views.module tripal_views_init()

Implements hook_init().

File

tripal_views/tripal_views.module, line 111

Code

function tripal_views_init() {

  // Need to ensure that all chado tables are integrated w/out making
  // the user go to views UI. It would be ideal to do this in a hook called only once
  // directly after install/enabling of the module but such a hook doesn't
  // exist in Drupal 6
  $tripal_views = db_fetch_object(db_query("SELECT true as has_rows FROM {tripal_views}"));
  if (!$tripal_views->has_rows) {
    tripal_views_integrate_all_chado_tables();
  }
}