You are here

function biblio_init in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 biblio.module \biblio_init()
  2. 6 biblio.module \biblio_init()
  3. 7.2 biblio.module \biblio_init()

Implements hook_init().

File

./biblio.module, line 135
Bibliography Module for Drupal.

Code

function biblio_init() {
  global $user, $conf;
  drupal_add_css(drupal_get_path('module', 'biblio') . '/biblio.css');

  // Prevent caching of biblio pages for anonymous users so session
  // variables work and thus filering works.
  if ($user->uid === 0 && variable_get('biblio_prevent_anon_cache', TRUE)) {
    $base = variable_get('biblio_base', 'biblio');
    if (drupal_match_path($_GET['q'], "{$base}\n{$base}/*")) {
      $conf['cache'] = FALSE;
    }
  }
}