function biblio_citekey_view in Bibliography Module 7
Same name and namespace in other branches
- 5 biblio.module \biblio_citekey_view()
- 6.2 includes/biblio.pages.inc \biblio_citekey_view()
- 6 biblio.pages.inc \biblio_citekey_view()
- 7.2 includes/biblio.pages.inc \biblio_citekey_view()
1 string reference to 'biblio_citekey_view'
- biblio_menu in ./
biblio.module - Implements hook_menu().
File
- includes/
biblio.pages.inc, line 1212 - Copyright (C) 2006-2011 Ron Jerome.
Code
function biblio_citekey_view() {
$citekey = arg(2);
$nid = db_query("SELECT nid FROM {biblio} WHERE biblio_citekey = :citekey ORDER BY vid DESC", array(
':citekey' => $citekey,
))
->fetchObject();
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,
));
}
}