You are here

function _biblio_format_keyword in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 includes/biblio.pages.inc \_biblio_format_keyword()
  2. 7 includes/biblio.pages.inc \_biblio_format_keyword()
  3. 7.2 includes/biblio.pages.inc \_biblio_format_keyword()
1 call to _biblio_format_keyword()
_biblio_format_keyword_page in ./biblio.pages.inc

File

./biblio.pages.inc, line 1271

Code

function _biblio_format_keyword($keyword) {
  $base = variable_get('biblio_base', 'biblio');
  $format = l(trim($keyword->word), "{$base}/keyword/{$keyword->kid}");
  $format .= ' (' . $keyword->cnt . ') ';
  $path = ord(substr($_GET['q'], -1)) > 97 ? $_GET['q'] . "/" : substr($_GET['q'], 0, -1);
  $edit_link = ' [' . l(t('edit'), $path . $keyword->kid . "/edit") . '] ';
  $format .= user_access('administer biblio') ? $edit_link : '';
  return $format;
}