Commit 55f2a1cf authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#157942 by drumm: only acquire node grants if node loaded successfuly,...

#157942 by drumm: only acquire node grants if node loaded successfuly, otherwise there are nasty permission problems
parent 7b61e596
......@@ -3050,7 +3050,12 @@ function node_access_rebuild() {
}
$result = db_query("SELECT nid FROM {node}");
while ($node = db_fetch_object($result)) {
node_access_acquire_grants(node_load($node->nid, NULL, TRUE));
$loaded_node = node_load($node->nid, NULL, TRUE);
// To preserve database integrity, only aquire grants if the node
// loads successfully.
if (!empty($loaded_node)) {
node_access_acquire_grants($loaded_node);
}
}
}
else {
......
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