Commit 6740cea2 authored by Dave Reid's avatar Dave Reid
Browse files

by Dave Reid: Convert to using objects for XML sitemaps instead of arrays.

parent f4d201bc
......@@ -403,7 +403,8 @@ function xmlsitemap_sitemap_save(stdClass $sitemap) {
// If the context was changed, we need to perform additional actions.
if (isset($smid_old) && $sitemap->smid != $smid_old) {
// Rename the files directory so the sitemap does not break.
$old_dir = xmlsitemap_get_directory(array('smid' => $smid_old));
$old_sitemap = (object) array('smid' => $smid_old);
$old_dir = xmlsitemap_get_directory($old_sitemap);
$new_dir = xmlsitemap_get_directory($sitemap);
xmlsitemap_directory_move($old_dir, $new_dir);
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