You are here

function _biblio_bibtex_type_map in Bibliography Module 7.2

Same name and namespace in other branches
  1. 6.2 modules/bibtexParse/biblio_bibtex.module \_biblio_bibtex_type_map()
  2. 7 modules/bibtexParse/biblio_bibtex.module \_biblio_bibtex_type_map()
2 calls to _biblio_bibtex_type_map()
_biblio_bibtex_export in modules/bibtexParse/biblio_bibtex.module
Export data in bibtex format.
_biblio_bibtex_import in modules/bibtexParse/biblio_bibtex.module

File

modules/bibtexParse/biblio_bibtex.module, line 448

Code

function _biblio_bibtex_type_map($type, $direction = 'export') {
  static $map = array();
  if (empty($map)) {
    $map = biblio_get_map('type_map', 'bibtex');
  }
  if ($direction == 'export') {
    return ($type = array_search($type, $map)) ? $type : 'article';
  }
  else {
    return isset($map[$type]) ? $map[$type] : 129;

    //return the biblio type or 129 (Misc) if type not found
  }
}