Following up on #610234: Overlay implementation there are several core modules that define their content as targeted for certain parts of the overlay by implementing hook_system_info_alter() on the current theme.
However, they only do this when the core Overlay module is enabled. The original intention there was to avoid polluting the .info files except when necessary - however, discussion at #610234: Overlay implementation indicates that if we do it that way, we prevent the hypothetical 'better_overlay' module in contrib from having access to that information.
So, it seems much better to just remove the module_exists('overlay') check, as in the attached patch.
Comment | File | Size | Author |
---|---|---|---|
#4 | remove-module-exists-overlay-checks-655736-4.patch | 2.31 KB | David_Rothstein |
remove-module-exists-overlay-checks.patch | 3.39 KB | David_Rothstein | |
Comments
Comment #1
ksenzeeAgreed. Dries commented a while back that he prefers to have other modules implement overlay's APIs, instead of providing hooks for every little thing they do that overlay would then implement. So given that pattern, there's no way to avoid having this kind of code throughout core. Removing the module_exists() calls at least loosens the coupling a little bit.
Comment #3
casey CreditAttribution: casey commentedNeeds a reroll; shortcut_system_info_alter() is gone
Comment #4
David_Rothstein CreditAttribution: David_Rothstein commentedHere's a reroll.
Comment #5
casey CreditAttribution: casey commentedComment #6
webchickYay for looser coupling!
Committed to HEAD.