You are here

function biblio_marc_check_md5 in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/marcParse/biblio_marc.module \biblio_marc_check_md5()
  2. 7.2 modules/marcParse/biblio_marc.module \biblio_marc_check_md5()
1 call to biblio_marc_check_md5()
biblio_marc_biblio_import in modules/marcParse/biblio_marc.module

File

modules/marcParse/biblio_marc.module, line 182

Code

function biblio_marc_check_md5($md5) {
  static $marc_md5s = array();
  if (empty($marc_md5s)) {
    $result = db_query("SELECT * FROM {biblio_marc} ");
    foreach ($result as $row) {
      $marc_md5s[$row->biblio_marc_md5] = $row->nid;
    }
  }
  if (isset($marc_md5s[$md5])) {
    return $marc_md5s[$md5];
  }
  else {

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