Issue #993186 by joshi.rohit100, moshe weitzman | webchick: Node access rebuilds should go newest to oldest (fix for direct node access rebuilds only, not rebuilds done via a batch).

merge-requests/26/head
David Rothstein 2014-09-01 19:34:15 -04:00
parent 8af676d684
commit 29a0dc349b
1 changed files with 2 additions and 1 deletions

View File

@ -3629,7 +3629,8 @@ function node_access_rebuild($batch_mode = FALSE) {
// Try to allocate enough time to rebuild node grants
drupal_set_time_limit(240);
$nids = db_query("SELECT nid FROM {node}")->fetchCol();
// Rebuild newest nodes first so that recent content becomes available quickly.
$nids = db_query("SELECT nid FROM {node} ORDER BY nid DESC")->fetchCol();
foreach ($nids as $nid) {
$node = node_load($nid, NULL, TRUE);
// To preserve database integrity, only acquire grants if the node