Posted by miro_dietiker on December 9, 2008 at 2:11pm
6 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | trigger.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
The hook_hook_info is poorly named.
As per http://api.drupal.org/api/function/hook_hook_info this is trigger related only and so should be renamed to hook_trigger_info.
This topic was discussed on IRC today and there where no votes against (yet).
Comments
#1
I have no objection to this. It makes more sense for it to be named hook_trigger_info().
#2
Providing patch for this rename against HEAD.
#3
possiblityis misspelled (it apparently was also a typo before this patch but it still needs to be fixed).#4
I fixed the spelling error and I confirmed that all possible replacements have been made. Follow-ups will be to make sure we document the change in the 6.x to 7.x page and also commit the change to contrib/docs/examples/trigger_example.module.
#5
#6
Very nice change.
#7
After all that positive confirmation i've consulted the file again..
There are other occurences of the word "hook" (e.g. variables $hook, $hooks) that are not critical for this api redefinition but could be renamed to $trigger, $triggers, ...
Should we do this in the same cycle? I'm not perfectly sure about all internal replacements.
#8
Hmm, I think it probably makes sense to change $hook to $trigger here, setting to needs review rather than CNW though in case that's out of scope.
#9
Makes sense to change the $hook(s) variables to $trigger(s).
#10
One little $trigger that should have been $triggers... and a little cleanup.
#11
The last submitted patch failed testing.
#12
Rerolled for review.
#13
The last submitted patch failed testing.
#14
http://api.drupal.org/api/function/hook_trigger_info/7
#15
Automatically closed -- issue fixed for 2 weeks with no activity.