Commit 10a56faa authored by Earnie Boyd's avatar Earnie Boyd

#529850 Node language is not updated.

parent 17627967
......@@ -3,6 +3,7 @@ $Id$
XML sitemap 6.x-1, 2009-07-24
-----------------------------------
#510076 The sitemap is not being submitted.
#529850 Node language is not updated.
XML sitemap 6.x-1, 2009-07-16
-----------------------------------
......
......@@ -309,13 +309,13 @@ function xmlsitemap_node_xmlsitemap_links() {
$row->changefreq = max(REQUEST_TIME - $node->changed, empty($node->previously_changed) ? $node->changed - $node->created : $node->changed - $node->previously_changed);
$priority = xmlsitemap_node_get_priority($node);
$row->priority = ($priority == -1.0) ? $priority : min(max(round($priority, 1), 0.0), 1.0);
$old_row = db_fetch_object(db_query("SELECT lid, type, priority FROM {xmlsitemap} WHERE loc = '%s'", $row->loc));
$old_row = db_fetch_object(db_query("SELECT lid, type, language, priority FROM {xmlsitemap} WHERE loc = '%s'", $row->loc));
$node_access = node_access('view', node_load(array('nid' => $node->nid), NULL, TRUE), $anon_account);
$row->priority = $node_access ? $row->priority : -1;
if ($old_row === FALSE) {
drupal_write_record('xmlsitemap', $row);
}
elseif ($old_row->type == 'node' && $old_row->priority != $row->priority) {
elseif ($old_row->type == 'node' && ($old_row->priority != $row->priority || $old_row->language != $row->language)) {
$row->lid = $old_row->lid;
drupal_write_record('xmlsitemap', $row, 'lid');
}
......
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