Skip to content

Instantly share code, notes, and snippets.

@deekayen
Created December 2, 2014 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deekayen/af6a5d13f5c889404d73 to your computer and use it in GitHub Desktop.
Save deekayen/af6a5d13f5c889404d73 to your computer and use it in GitHub Desktop.
Remove the time limit imposed by Drupal 7's node_access_rebuild function by hacking core.
diff --git a/modules/node/node.module b/modules/node/node.module
index dbb1a65..a750cf9 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -3634,7 +3634,7 @@ function node_access_rebuild($batch_mode = FALSE) {
}
else {
// Try to allocate enough time to rebuild node grants
- drupal_set_time_limit(240);
+ drupal_set_time_limit(0);
// Rebuild newest nodes first so that recent content becomes available quickly.
$nids = db_query("SELECT nid FROM {node} ORDER BY nid DESC")->fetchCol();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment