You are here

function biblio_ris_check_md5 in Bibliography Module 7.2

Same name and namespace in other branches
  1. 6.2 modules/RIS/biblio_ris.module \biblio_ris_check_md5()
  2. 7 modules/RIS/biblio_ris.module \biblio_ris_check_md5()
2 calls to biblio_ris_check_md5()
_biblio_ris_import in modules/RIS/biblio_ris.module
_biblio_ris_import_string in modules/RIS/biblio_ris.module

File

modules/RIS/biblio_ris.module, line 459

Code

function biblio_ris_check_md5($md5) {
  static $ris_md5s = array();
  if (empty($ris_md5s)) {
    $result = db_query("SELECT * FROM {biblio_ris} ");
    foreach ($result as $row) {
      $ris_md5s[$row->biblio_ris_md5] = $row->bid;
    }
  }
  if (isset($ris_md5s[$md5])) {
    return $ris_md5s[$md5];
  }
  else {
    $ris_md5s[$md5] = TRUE;

    // gaurd against duplicates in the same import
    return;
  }
}