Add hooks to MediaWiki's unblocking and user rights processes
The popular wiki platform, MediaWiki, powers a wide range of collaborative editing projects, such as Wikipedia and Wikivoyage, as well as many internal corporate wikis and other sites.
MediaWiki extensions make use of "hooks" provided by MediaWiki's core code, in order to provide new functionality or modify existing behaviour. Your task is to add three hooks to MediaWiki core:
- Add two hooks to the
SpecialUnblock
class (UnblockUser
andUnblockUserComplete
), mirroring the hooks available inSpecialBlock
(BlockIp
andBlockIpComplete
). See https://phabricator.wikimedia.org/T50546 for more information. - Add a hook that runs just before the user rights are changed in the
SpecialUserrights
class. See https://phabricator.wikimedia.org/T49338.
Please submit these as two separate patches, as they are not related to each other. I'll let you figure out where in the code the calls to Hooks::run
need to occur. Don't forget to document the hooks in docs/hooks.txt
(that file also contains useful info about hooks).
If you need any assistance with this task, please don't hesitate to contact me in IRC (Freenode #wikimedia-dev, webchat available at https://webchat.freenode.net/?channels=#wikimedia-dev, my nick is tto
) or by e-mail (at.light@live.com.au).