You are here

function biblio_init in Bibliography Module 7.2

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

Implements hook_init().

@global object $user @global array $conf

File

./biblio.module, line 146

Code

function biblio_init() {
  global $user, $conf;
  drupal_add_css(drupal_get_path('module', 'biblio') . '/biblio.css');
  if ($user->uid === 0) {

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