Commit 0cf4604a authored by Dave Reid's avatar Dave Reid
Browse files

by Dave Reid: Reset node_access() static so we can catch changes to nodes.

parent 04db0c1f
......@@ -304,6 +304,11 @@ function xmlsitemap_node_create_link(&$node) {
$node->xmlsitemap['changefreq'] = $node->nid ? xmlsitemap_calculate_changefreq($timestamps) : 0;
$node->xmlsitemap['changecount'] = $node->nid ? count($timestamps) - 1 : 0;
// Node access must be reset since it a user may have changed published status, etc.
$access = &drupal_static('node_access');
unset($access[0][$node->nid]);
//node_access_acquire_grants($node);
// The following values must always be checked because they are volatile.
$node->xmlsitemap['lastmod'] = isset($node->changed) ? $node->changed : REQUEST_TIME;
$node->xmlsitemap['access'] = $node->nid ? (bool) node_access('view', $node, drupal_anonymous_user()) : 1;
......
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