summaryrefslogtreecommitdiff
path: root/modules/node
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2014-09-01 19:34:15 -0400
committerDavid Rothstein <drothstein@gmail.com>2014-09-01 19:34:15 -0400
commit29a0dc349bf1ec8251cccc4e561eabcaccde038b (patch)
treea2ee4dee5f64311e302ff21d75650c3df72b70e1 /modules/node
parent8af676d68440e4909eb9f42a4a0189a266f2191a (diff)
downloadbrdo-29a0dc349bf1ec8251cccc4e561eabcaccde038b.tar.gz
brdo-29a0dc349bf1ec8251cccc4e561eabcaccde038b.tar.bz2
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).
Diffstat (limited to 'modules/node')
-rw-r--r--modules/node/node.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 5a4e01947..ba72b8506 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -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