Page MenuHomePhabricator

Move AbuseFilter::buildEditBox static method to AbuseFilterView class
Closed, ResolvedPublic

Description

The method is only called from AbuseFilterView extensions (which extend ContextSource) whereas it depends on some global variables.

Event Timeline

Restricted Application added subscribers: Scoopfinder, Aklapper. · View Herald TranscriptMar 20 2018, 4:31 PM

@matej_suchanek Since this doesn't affect contents and is quick to write, would you agree on stalling it until https://gerrit.wikimedia.org/r/#/c/410129/ and dependencies are merged? I'm saying so because they touch such method and would require to be changed again.

Of course, there is no "deadline" for getting it done. I just didn't want to forget about this, so I put it here.

Change 424860 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Move AbuseFilter::buildEditBox static method to AbuseFilterView class

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

Daimona claimed this task.Apr 8 2018, 3:58 PM
Daimona triaged this task as Low priority.
Huji closed this task as Resolved.Apr 26 2018, 1:35 PM
Huji removed a project: Patch-For-Review.

Change 424860 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Move AbuseFilter::buildEditBox static method to AbuseFilterView class

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

After the patch I am observing:

Notice: Undefined variable: canEdit in /var/www/core/extensions/AbuseFilter/includes/Views/AbuseFilterView.php on line 124

Notice: Undefined variable: canEdit in /var/www/core/extensions/AbuseFilter/includes/Views/AbuseFilterView.php on line 133

@Nikerabbit Right, I'll send a patch shortly, however seems like an older problem which only prevents the edit box from having the readonly attribute when CodeEditor isn't installed.