function _parseExtendedData(&$entry, $innerTags) { foreach ($innerTags["data"] as $data) { if ($data["name"] === "HeuristID") { $id = $data["value"][0]["-text"][0]; setPermanentBiblioID($entry, $id); } } }
function process_disambiguations() { global $session_data; set_progress_bar_title('Processing ambiguous entries'); if (!@$session_data['ambiguities']) { return; } $i = 0; foreach (array_keys($session_data['ambiguities']) as $id) { $ambig_entry =& $session_data['ambiguities'][$id]; if (!$ambig_entry->getPotentialMatches()) { $ambig_entry =& $ambig_entry->_ancestor; } if (!@$_REQUEST['ambig'][$id]) { // user hasn't chosen an option, let them sit there and fester $ambig_entry->_matches = array(); continue; } $ambig_bib_id = $_REQUEST['ambig'][$id]; if ($ambig_bib_id == -1) { // user has selected NEW -- none of the presented options were correct // move the hitherto potential matches to DEFINITE NON-MATCHES $ambig_entry->eliminatePotentialMatches(); } else { if (in_array($ambig_bib_id, $ambig_entry->getPotentialMatches())) { setPermanentBiblioID($ambig_entry, $ambig_bib_id); $ambig_entry->eliminatePotentialMatches(); } else { // funny buggers $ambig->_matches = array(); } } update_progress_bar(++$i / count($session_data['ambiguities'])); } update_progress_bar(-1); flush_fo_shizzle(); }