Closed (fixed)
Project:
Colorbox
Version:
6.x-1.0-beta5
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Jul 2010 at 22:57 UTC
Updated:
4 Dec 2011 at 05:54 UTC
Jump to comment: Most recent file
Comments
Comment #1
frjo commentedThis looks neat!
Just some minor stuff.
Could we not simply skip the following part?:
And what you think about wrapping the module_implements part like this:
No need to run the hook if access is already true?
Comment #2
aufumy commentedThe if (!$access) , is a good idea. Alternatively, there could be returns inside the case statement.
Regarding removing the
if ($access)within the foreach, if there are two modules A and B with hook_colorbox_form_access, then by default both will return false, unless A allows $form_id to go through.However, without the
if ($access)inside the foreach, hook for $form_id will be overwritten.Comment #3
frjo commentedSorry for forgetting this issue.
Does this patch looks ok to you?
Comment #4
aufumy commentedLooks great to me.
Thank you.
Comment #5
frjo commentedFinally committed to 6-dev.
Comment #7
murzCan't find this patch in 7.x version, can you port it to 7.x too?