function taxonomy_xml_invoke_import_on_url in Taxonomy import/export via XML 6.2
Same name and namespace in other branches
- 7 taxonomy_xml.module \taxonomy_xml_invoke_import_on_url()
Load a vocabulary from the given URL and import it
1 call to taxonomy_xml_invoke_import_on_url()
- taxonomy_xml_fetch_and_import in ./
taxonomy_xml.module - Fetches the data according to the given method, then invokes the import on that data.
1 string reference to 'taxonomy_xml_invoke_import_on_url'
- taxonomy_xml_invoke_service_request in ./
taxonomy_xml.module - Make a request on a remote taxonomy server and process the response
File
- ./
taxonomy_xml.module, line 692 - This module makes it possible to import and export taxonomies as XML documents.
Code
function taxonomy_xml_invoke_import_on_url($url, $form_values) {
if ($url) {
$text = taxonomy_xml_cached_get_contents($url);
if (!empty($text)) {
drupal_set_message(t('Retrieved Submitted URL %url. Now starting an import process.', array(
'%url' => $url,
)));
return taxonomy_xml_invoke_import($text, $form_values, $url);
}
else {
drupal_set_message(t('<strong>Taxonomy XML</strong>: Failed to retrieve content from <a href="!url">!url</a>. Check this URL and access to it. This will not work on sites requiring authentication', array(
'!url' => $url,
)), 'error');
}
}
else {
drupal_set_message(t('<strong>Taxonomy XML</strong>: No URL. A valid, readable URL required.'), 'error');
}
return FALSE;
}