You are here

function _biblio_keyword_links in Bibliography Module 5

Same name and namespace in other branches
  1. 6.2 includes/biblio.pages.inc \_biblio_keyword_links()
  2. 6 biblio.pages.inc \_biblio_keyword_links()
  3. 7 includes/biblio_theme.inc \_biblio_keyword_links()
  4. 7.2 includes/biblio.theme.inc \_biblio_keyword_links()
2 calls to _biblio_keyword_links()
biblio_show_node in ./biblio.module
theme_biblio_long in ./biblio.module

File

./biblio.module, line 3170

Code

function _biblio_keyword_links($keywords, $base = 'biblio') {
  if (isset($_GET['sort'])) {
    $query .= "sort=" . $_GET['sort'];
  }
  if (isset($_GET['order'])) {
    $query .= $query ? "&" : "";
    $query .= "order=" . $_GET['order'];
  }
  $html = "";
  $sep = check_plain(variable_get('biblio_keyword_sep', ','));

  //  if (strstr($keywords,';')) {
  $keyword_array = explode($sep, $keywords);

  /*  }elseif (strstr($keywords,',')) {
      $keyword_array = explode(",", $keywords);
    }else{
      $keyword_array = explode(" ", $keywords);
    }
  */
  foreach ($keyword_array as $kw) {
    $html .= empty($html) ? "" : "; ";
    $html .= l(trim($kw), "{$base}/keyword/" . trim($kw), NULL, $query);
  }
  return $html;
}