| 6 node.module | node_access_needs_rebuild($rebuild = NULL) |
| 7 node.module | node_access_needs_rebuild($rebuild = NULL) |
| 8 node.module | 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 value
(If no value was provided for $rebuild) The current value of the flag.
Related topics
5 calls to node_access_needs_rebuild()
1 string reference to 'node_access_needs_rebuild'
File
- modules/
node/ node.module, line 2297 - The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.
Code
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');
}
}
Login or register to post comments