Page MenuHomePhabricator

Make SpecialMuteModifyFormFields hook to not pass the entire special page
Closed, ResolvedPublic

Description

Per code review discussion.

Current
public function onSpecialMuteModifyFormFields( SpecialPage $sp, array &$fields );
Desired
public function onSpecialMuteModifyFormFields( User $target, array &$fields );

The hook is currently used only by Echo extension, and they'll have to be fixed together.

Event Timeline

Ammarpad created this task.Jul 6 2020, 7:22 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 6 2020, 7:22 AM
Ammarpad updated the task description. (Show Details)

@Ammarpad Hi I would like to work on this task. I am new to wikimedia. I found this file https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/HookContainer/HookRunner.php It contains this function, can you please explain what I need to do here?

@Shubham656jain: Hi, do you have a specific question what exactly is unclear in the task description, and what you have tried already? Thanks. :)

Hi @Aklapper I wanted to know if I need to change $sp to $target in this file https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/HookContainer/HookRunner.php on line number 3692 and 3695. Please guide!

Ammarpad added a comment.EditedOct 29 2020, 10:37 PM

@Shubham656jain, You'd need to change the signature from 'current' to 'desired' as given in the task description. Also, see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/specials/SpecialMute.php$207

Change 637686 had a related patch set uploaded (by Shubham656jain; owner: Shubham656jain):
[mediawiki/core@master] Make SpecialMuteModifyFormFields hook to not pass the entire special page

https://gerrit.wikimedia.org/r/637686

Ammarpad updated the task description. (Show Details)Oct 30 2020, 12:34 PM

Change 637705 had a related patch set uploaded (by Shubham656jain; owner: Shubham656jain):
[mediawiki/extensions/Echo@master] Make SpecialMuteModifyFormFields hook to not pass the entire special page

https://gerrit.wikimedia.org/r/637705

Change 637686 merged by jenkins-bot:
[mediawiki/core@master] Make SpecialMuteModifyFormFields hook to not pass the entire special page

https://gerrit.wikimedia.org/r/637686

Change 637705 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Modify EchoHooks.php to make hook not pass the entire special page

https://gerrit.wikimedia.org/r/637705

@Shubham656jain: Hi, all related patches in Gerrit have been merged. Can this task be resolved (via Add Action...Change Status in the dropdown menu), or is there more to do in this task? Asking as you are set as task assignee. Thanks in advance!

@Aklapper Hi! Yes this task is completed according to me.

Ammarpad closed this task as Resolved.Mon, Nov 23, 11:27 AM