function _xmlsitemap_sitemap_rehash_all in XML sitemap 6.2
Same name and namespace in other branches
- 7.2 xmlsitemap.install \_xmlsitemap_sitemap_rehash_all()
1 call to _xmlsitemap_sitemap_rehash_all()
- xmlsitemap_update_6204 in ./
xmlsitemap.install - Convert {xmlsitemap}.context_hash to replace {xmlsitemap}.smid.
File
- ./
xmlsitemap.install, line 704 - Install, update and uninstall functions for the xmlsitemap module.
Code
function _xmlsitemap_sitemap_rehash_all() {
// Reload the schema cache and reprocess all sitemap hashes into smids.
drupal_load('module', 'xmlsitemap');
drupal_get_schema(NULL, TRUE);
// Force a rehash of all sitemaps.
$sitemaps = xmlsitemap_sitemap_load_multiple(FALSE);
foreach ($sitemaps as $sitemap) {
$hash = xmlsitemap_sitemap_get_context_hash($sitemap->context);
if ($hash != $sitemap->smid) {
xmlsitemap_sitemap_save($sitemap);
}
}
}