Closed (won't fix)
Project:
Drupal core
Version:
5.1
Component:
other
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2007 at 18:25 UTC
Updated:
20 Jun 2011 at 01:45 UTC
I'm implementing hook_node_grants() in a module. I thought that I would call node_access_rebuild() from both the implementation of hook_enable() and hook_disable(). I realized that the line in node_access_rebuild()
if (count(module_implements('node_grants'))) {
counts my disabled module also as implementing 'node_grants'. This is a bug. Only the enabled modules should be counted.
Comments
Comment #1
attila75 commentedI realized that my previous statement about node_access_rebuild() was not true: it does not have that bug. However it is too early to call node_access_rebuild() from the implementation of hook_disable. This is understandable according to the documentation of hook_disable: "Perform necessary actions *before* module is disabled." Therefore there is a need for a hook which is called *after* the module is disabled. This would be a nice place to call node_access_rebuild().
Comment #2
attila75 commentedNot sure about the right component for this bug, since the change should go to module_disable() in module.inc (I guess).
Comment #3
bwynants commented+1 for same reason.
Comment #4
dpearcefl commentedConsidering the age of this issue with no comments and that Drupal 5 is no longer supported, I'm closing this ticket.