Commit 28de8ef8 authored by Dave Reid's avatar Dave Reid
Browse files

by Dave Reid: Fixed xmlsitemap engine info caching.

parent 160e3e16
......@@ -146,12 +146,14 @@ function xmlsitemap_engines_get_engine_info($engine = NULL) {
if ($cached = cache_get('xmlsitemap:engines:' . $language->language)) {
$engines = $cached->data;
}
// Fetch the results of all hook_xmlsitemap_engine_info() implementations.
$engines = module_invoke_all('xmlsitemap_engine_info');
// Allow other modulse to alter the engine info.
drupal_alter('xmlsitemap_engine_info', $engines);
// Cache by language since engine names are translated.
cache_set('xmlsitemap:engines:' . $language->language, $engines);
else {
// Fetch the results of all hook_xmlsitemap_engine_info() implementations.
$engines = module_invoke_all('xmlsitemap_engine_info');
// Allow other modulse to alter the engine info.
drupal_alter('xmlsitemap_engine_info', $engines);
// Cache by language since engine names are translated.
cache_set('xmlsitemap:engines:' . $language->language, $engines);
}
}
if (isset($engine)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment