unset($xrefs[$old_xref]); WT_DB::exec("UNLOCK TABLES"); WT_DB::exec("COMMIT"); try { WT_DB::prepare("UPDATE `##favorite` SET xref = ? WHERE xref = ? AND gedcom_id = ?")->execute(array($new_xref, $old_xref, WT_GED_ID)); } catch (Exception $ex) { // Perhaps the favorites module was not installed? } // How much time do we have left? if (microtime(true) - $start_time > ini_get('max_execution_time') - 5) { echo '<p>', WT_I18N::translate('The server’s time limit was reached.'), '</p>'; break; } } if ($xrefs) { } } else { echo '<p>', WT_I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or "R14".'), '</p>'; echo '<p>', WT_I18N::translate('You can renumber a family tree so that these reference numbers are unique across all family trees.'), '</p>'; } echo '<p>', WT_I18N::plural('This family tree has %s record which uses the same “XREF” as another family tree.', 'This family tree has %s records which use the same “XREF” as another family tree.', count($xrefs), count($xrefs)), '</p>'; if ($xrefs) { // We use GET (not POST) for this update operation - because we want the user to // be able to press F5 to continue after a timeout. echo '<form method="GET" action="', WT_SCRIPT_NAME, '">'; echo '<p>', WT_I18N::translate('You can renumber this family tree.'); echo '<input type="submit" name="go" value="', WT_I18N::translate('go'), '"></p>'; echo '<input type="hidden" name="ged" value="', WT_Filter::escapeUrl(WT_GEDCOM), '">'; echo '</form>'; echo '<p>', WT_I18N::translate('Caution! This may take a long time. Be patient.'), '</p>'; }