function _loadMD5 in Bibliography Module 7
Same name and namespace in other branches
- 6 biblio.contributors.inc \_loadMD5()
- 7.2 includes/biblio.contributors.inc \_loadMD5()
File
- includes/
biblio.contributors.inc, line 671
Code
function _loadMD5() {
static $md5 = array();
static $count = 0;
$db_count = db_query("SELECT COUNT(*) FROM {biblio_contributor_data}")
->fetchField();
// Refresh the cached data as some new authors may have been added or removed.
if ($db_count != $count) {
$count = $db_count;
$md5 = array();
$result = db_query('SELECT md5,cid FROM {biblio_contributor_data} ');
foreach ($result as $row) {
$md5[$row->cid] = $row->md5;
}
}
return count($md5) ? $md5 : NULL;
}