You are here

function biblio_citekey_view in Bibliography Module 6

Same name and namespace in other branches
  1. 5 biblio.module \biblio_citekey_view()
  2. 6.2 includes/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()

Return value

unknown_type

1 string reference to 'biblio_citekey_view'
biblio_menu in ./biblio.module
Implementation of hook_menu().

File

./biblio.pages.inc, line 1078

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,
    ));
  }
}