You are here

public function EndNoteXMLParser::biblio_xml_check_md5 in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::biblio_xml_check_md5()
  2. 7.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::biblio_xml_check_md5()
2 calls to EndNoteXMLParser::biblio_xml_check_md5()
EndNoteXMLParser::endnote7_endElement in modules/endnote/endnote_xml_parser.inc
EndNoteXMLParser::endnote8_endElement in modules/endnote/endnote_xml_parser.inc

File

modules/endnote/endnote_xml_parser.inc, line 548
endnote_xml_parser.inc

Class

EndNoteXMLParser

Code

public function biblio_xml_check_md5($md5) {
  static $xml_md5s = array();
  if (empty($xml_md5s)) {
    $result = db_query("SELECT * FROM {biblio_xml} ");
    foreach ($result as $row) {
      $xml_md5s[$row->biblio_xml_md5] = $row->nid;
    }
  }
  if (isset($xml_md5s[$md5])) {
    return $xml_md5s[$md5];
  }
  else {

    // Gaurd against duplicates in the same import.
    $xml_md5s[$md5] = TRUE;
    return;
  }
}