You are here

function biblio_pm_biblio_import in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 modules/pubmed/biblio_pm.module \biblio_pm_biblio_import()
  2. 7 modules/pubmed/biblio_pm.module \biblio_pm_biblio_import()
  3. 7.2 modules/pubmed/biblio_pm.module \biblio_pm_biblio_import()
1 call to biblio_pm_biblio_import()
biblio_import in ./biblio.import.export.inc
Import data from a file and return the node ids created.

File

pubmed/biblio_pm.module, line 70

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->filepath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
  if (empty($pmids)) {
    drupal_set_message("Could not open PubMed ID file", 'error');
    return;
  }
  return _biblio_pm_import_pmids($pmids, $terms, $batch, $session_id);
}