function biblio_pm_check_md5 in Bibliography Module 6
Same name and namespace in other branches
- 6.2 modules/pubmed/biblio_pm.module \biblio_pm_check_md5()
- 7 modules/pubmed/biblio_pm.module \biblio_pm_check_md5()
- 7.2 modules/pubmed/biblio_pm.module \biblio_pm_check_md5()
1 call to biblio_pm_check_md5()
File
- pubmed/
biblio_pm.module, line 206
Code
function biblio_pm_check_md5($md5) {
static $pm_md5s = array();
if (empty($pm_md5s)) {
$result = db_query("SELECT * FROM {biblio_pubmed} ");
while ($row = db_fetch_object($result)) {
$pm_md5s[$row->biblio_pubmed_md5] = $row->nid;
}
}
if (isset($pm_md5s[$md5])) {
return $pm_md5s[$md5];
}
else {
$pm_md5s[$md5] = TRUE;
// gaurd against duplicates in the same import
return;
}
}