node_access_needs_rebuild

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 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.

Übergabeparameter

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

Rückgabewert

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

Verwandte Themen

▾ 5 functions call node_access_needs_rebuild()

module_disable in includes/module.inc
Disable a given set of modules.
module_enable in includes/module.inc
Enable a given list of modules.
node_access_rebuild in 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 modules/node/node.module
Implementation of hook_help().
_node_access_rebuild_batch_finished in modules/node/node.module
Post-processing for node_access_rebuild_batch.

Code

modules/node/node.module, line 2746

<?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');
  }
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen