Properly handle disabled hooks & includes#7666
Merged
jdarwood007 merged 4 commits intoSimpleMachines:release-2.1from Mar 12, 2023
Merged
Properly handle disabled hooks & includes#7666jdarwood007 merged 4 commits intoSimpleMachines:release-2.1from
jdarwood007 merged 4 commits intoSimpleMachines:release-2.1from
Conversation
Signed by Shawn Bulen, bulens@pacbell.net
Signed by Shawn Bulen, bulens@pacbell.net
Signed by Shawn Bulen, bulens@pacbell.net
Contributor
Author
Some before/after tests...Test #1 - disable one hook:Before - mutant partial hook entry (no path specified): After - hook properly disabled: Test #2 - uninstall with a disabled hook:Before - hook fragment left behind: Test #3 - disable all via repair_settings.php:Before - note it thinks the include is missing: After - it no longer thinks the include is missing, so it can be re-enabled: |
Signed by Shawn Bulen, bulens@pacbell.net
Contributor
Author
Member
|
I tested this with a few of my mods, including dev tools. Nothing seemed to break and the hooks did seem to remain clean. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Fixes #7634
This addresses a number of problems where adding/removing mods did not properly deal with disabled hooks. It also addresses numerous issues with the Integration Hooks admin function when dealing with disabled hooks & also when dealing with includes.
Changes:
At this point, adding mods no longer creates dupes, and results in one clean set of integration hooks, even when cleaning up after a broken install/uninstall. Removing mods removes all the hooks, no matter what the status.
Also, as intended, you can now use the Integration Hooks function to do most hook cleanup activity. Even if you were to accidentally disable all hooks in repair_settings.php.