function tripal_views_init
2.x tripal_views.module | tripal_views_init() |
1.x tripal_views.module | tripal_views_init() |
Implements hook_init().
Related topics
File
- tripal_views/
tripal_views.module, line 152 - Basic Tripal Views functionality
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_query("SELECT true as has_rows FROM {tripal_views}");
$tripal_views = $tripal_views->fetchObject();
if (isset($tripal_views)) {
if (!$tripal_views->has_rows) {
tripal_rebuild_views_integrations();
}
}
}