function biblio_bibtex_biblio_import in Bibliography Module 6.2
Same name and namespace in other branches
- 7 modules/bibtexParse/biblio_bibtex.module \biblio_bibtex_biblio_import()
- 7.2 modules/bibtexParse/biblio_bibtex.module \biblio_bibtex_biblio_import()
1 call to biblio_bibtex_biblio_import()
- biblio_bibtex_form_biblio_node_form_validate in modules/
bibtexParse/ biblio_bibtex.module
File
- modules/
bibtexParse/ biblio_bibtex.module, line 165
Code
function biblio_bibtex_biblio_import($file, $terms = array(), $batch = FALSE, $session_id = NULL, $save = TRUE, $string = FALSE) {
$nids = array();
$dups = array();
module_load_include('php', 'biblio_bibtex', 'PARSEENTRIES');
$bibtex = new PARSEENTRIES();
if ($string) {
$bibtex
->loadBibtexString($file);
}
else {
$bibtex
->openBib($file->filepath);
}
$bibtex
->extractEntries();
if ($bibtex->count) {
$entries =& $bibtex
->getEntries();
list($nids, $dups) = _biblio_bibtex_import($entries, $terms, $batch, $session_id, $save);
}
return array(
$nids,
$dups,
);
}