node_access_needs_rebuild

Versions
6 – 7
node_access_needs_rebuild($rebuild = NULL)

Flag / unflag the node access grants for rebuilding, or read the current value of the flag.

When the flag is set, a message is displayed to users with 'access administration pages' permission, pointing to the 'rebuild' confirm form. This can be used as an alternative to direct node_access_rebuild calls, allowing administrators to decide when they want to perform the actual (possibly time consuming) rebuild. When unsure the current user is an adminisrator, node_access_rebuild should be used instead.

Parameters

$rebuild (Optional) The boolean value to be written.

  • @return (If no value was provided for $rebuild) The current value of the flag.

Related topics

▾ 10 functions call node_access_needs_rebuild()

apachesolr_nodeaccess_node_access_records in contrib-6/apachesolr/contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module
Implementation of hook_node_access_records().
apachesolr_nodeaccess_rebuild_nodeaccess in contrib-6/apachesolr/contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module
Force Solr to do a total re-index when node access rules change.
domain_delete_form_submit in contrib-6/domain/domain.admin.inc
Implement domain_delete_form submit hook.
domain_update_6200 in contrib-6/domain/domain.install
Updates to 6.x.2.
module_disable in drupal-6/includes/module.inc
Disable a given set of modules.
module_enable in drupal-6/includes/module.inc
Enable a given list of modules.
node_access_rebuild in drupal-6/modules/node/node.module
Rebuild the node access database. This is occasionally needed by modules that make system-wide changes to access levels.
node_help in drupal-6/modules/node/node.module
Implementation of hook_help().
og_node_type_form_submit in contrib-6/og/og.module
Rebuild node access if usage has changed.
_node_access_rebuild_batch_finished in drupal-6/modules/node/node.module
Post-processing for node_access_rebuild_batch.

Code

drupal-6/modules/node/node.module, line 2283

<?php
function node_access_needs_rebuild($rebuild = NULL) {
  if (!isset($rebuild)) {
    return variable_get('node_access_needs_rebuild', FALSE);
  }
  elseif ($rebuild) {
    variable_set('node_access_needs_rebuild', TRUE);
  }
  else {
    variable_del('node_access_needs_rebuild');
  }
}
?>

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options