Unverified Commit 88d0828b authored by VitalyM's avatar VitalyM Committed by Dave Reid

Issue #2930268 by VitalyM, eyilmaz: Fixed context arrays should be sorted...

Issue #2930268 by VitalyM, eyilmaz: Fixed context arrays should be sorted using ksort() instead of asort() prior to hashing to ensure consistency with more than one context.
parent c67137ab
...@@ -567,6 +567,13 @@ function xmlsitemap_update_7203() { ...@@ -567,6 +567,13 @@ function xmlsitemap_update_7203() {
_xmlsitemap_sitemap_rehash_all(); _xmlsitemap_sitemap_rehash_all();
} }
/**
* Rehash all sitemaps according to new context sorting.
*/
function xmlsitemap_update_7204() {
_xmlsitemap_sitemap_rehash_all();
}
/** /**
* Rehash all. * Rehash all.
*/ */
......
...@@ -531,7 +531,7 @@ function xmlsitemap_sitemap_get_max_filesize(stdClass $sitemap) { ...@@ -531,7 +531,7 @@ function xmlsitemap_sitemap_get_max_filesize(stdClass $sitemap) {
* Get context. * Get context.
*/ */
function xmlsitemap_sitemap_get_context_hash(array &$context) { function xmlsitemap_sitemap_get_context_hash(array &$context) {
asort($context); ksort($context);
return drupal_hash_base64(serialize($context)); return drupal_hash_base64(serialize($context));
} }
...@@ -1591,7 +1591,7 @@ function xmlsitemap_get_current_context() { ...@@ -1591,7 +1591,7 @@ function xmlsitemap_get_current_context() {
if (!isset($context)) { if (!isset($context)) {
$context = module_invoke_all('xmlsitemap_context'); $context = module_invoke_all('xmlsitemap_context');
drupal_alter('xmlsitemap_context', $context); drupal_alter('xmlsitemap_context', $context);
asort($context); ksort($context);
} }
return $context; return $context;
......
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