You are here

function _biblio_save_imported_nodes in Bibliography Module 5

4 calls to _biblio_save_imported_nodes()
_bibtex_import in ./biblio.module
_endnote_tagged_import in ./tagged_parser.inc
Copyright (C) 2006 Ron Jerome
_endnote_XML_import in ./biblio.module
_ris_tagged_import in ./ris_parser.inc
Copyright (C) 2006 Ron Jerome

File

./biblio.module, line 3014

Code

function _biblio_save_imported_nodes(&$node_array) {
  if (function_exists('node_save')) {
    foreach ($node_array as $node) {
      $node = (object) $node;
      if (variable_get('biblio_keyword_freetagging', 0) && variable_get('biblio_freetagging_vocab', 0)) {
        $vid = variable_get('biblio_freetagging_vocab', 0);
        $node->taxonomy['tags'][$vid] = str_replace(';', ',', $node->biblio_keywords);
      }
      node_save($node);
      if ($node->nid) {
        $node_ids[] = $node->nid;
      }
    }
  }
  drupal_set_message(t("Succesfully imported @count entries.", array(
    '@count' => count($node_ids),
  )), 'status');
  return $node_ids;
}