You are here

function biblio_pm_biblio_import in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/pubmed/biblio_pm.module \biblio_pm_biblio_import()
  2. 6 pubmed/biblio_pm.module \biblio_pm_biblio_import()
  3. 7.2 modules/pubmed/biblio_pm.module \biblio_pm_biblio_import()

File

modules/pubmed/biblio_pm.module, line 227

Code

function biblio_pm_biblio_import($file, $terms = array(), $batch = FALSE, $session_id = NULL, $save = TRUE, $string = FALSE) {
  $nids = array();
  $dups = array();
  $pmids = file($file->uri, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
  if (empty($pmids)) {
    drupal_set_message(t("Could not open PubMed ID file"), 'error');
    return;
  }
  return biblio_pm_import_ids($pmids, $terms, $batch, $session_id);
}