$import->import_xhtml_writing_systems($dom, $dom_xpath); //} /* * Import */ $import->search_table_name = $wpdb->prefix . 'sil_search'; global $current_user; get_currentuserinfo(); if ($filetype == 'configured') { // Make sure we're not working on a reversal file. $reversals = $dom_xpath->query('(//xhtml:span[contains(@class, "reversal-form")])[1]'); if ($reversals->length > 0) { return; } //inform the user about which fields are available $arrFieldQueries = $import->getArrFieldQueries(); foreach ($arrFieldQueries as $fieldQuery) { $fields = $dom_xpath->query($fieldQuery); if ($fields->length == 0 && isset($_POST['chkShowDebug'])) { echo "No entries found for the query " . $fieldQuery . "<br>"; } } echo "Starting Import\n"; $import->import_xhtml_entries($dom, $dom_xpath); $import->index_searchstrings(); $import->convert_fields_to_links(); $message = "The import of the vernacular (configured) xhtml export is completed.\n"; $message .= "Go here to configure more settings: " . get_site_url() . "/wp-admin/admin.php?page=webonary"; wp_mail($current_user->user_email, 'Import complete', $message); echo "Import finished\n"; } elseif ($filetype == 'reversal') {