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