You are here

function biblio_citekey_view in Bibliography Module 5

Same name and namespace in other branches
  1. 6.2 includes/biblio.pages.inc \biblio_citekey_view()
  2. 6 biblio.pages.inc \biblio_citekey_view()
  3. 7 includes/biblio.pages.inc \biblio_citekey_view()
  4. 7.2 includes/biblio.pages.inc \biblio_citekey_view()
1 string reference to 'biblio_citekey_view'
biblio_menu in ./biblio.module
Implementation of hook_menu().

File

./biblio.module, line 1852

Code

function biblio_citekey_view() {
  $citekey = arg(2);
  $nid = db_fetch_object(db_query("SELECT nid FROM {biblio} WHERE biblio_citekey = '%s' ORDER BY vid DESC", $citekey));
  if ($nid->nid > 0) {
    $node = node_load($nid->nid);
    return node_page_view($node);
  }
  else {
    return t("Sorry, citekey @cite not found", array(
      '@cite' => $citekey,
    ));
  }
}