https://bugzilla.wikimedia.org/show_bug.cgi?id=42064

--- Comment #17 from Chris Steipp <cste...@wikimedia.org> ---
I would be fine with your proposal, with just a couple minor modifications.
It's definitely more "How Things Are Generally Done in MediaWiki".

Part of me would like to use this as an opportunity to take steps towards
reworking spam handling in core. But even if we change how we do spam handling
in the future, I think your plan is simple enough that we're not going to code
ourselves into a corner or waste too much time getting the protection for
wikidata in now.


> 1) modify the EditFilterMergedContent hook to be more generic, so it can be
> called from EditEntity as well as from EditPage. The most important change
> woudl be to pass an IContextSource as the first parameter instead of the
> EditPage. That already provides most information needed, including the
> WikiPage
> object. Modifying hooks is of course not to be taken lightly, but
> EditFilterMergedContent was only introduced in 1.21 as a Content-object aware
> alternative to the now deprecated EditFilterMerged. No extension is using it
> yet (AbuseFilter was due to be changed to use the new hook anyway).

I agree. May need to ask on wikitech-l to make sure no one has started relying
on it, but it's probably fine.


> 2) make EditEntity call EditFilterMergedContent.

Yep.


> 3) Make AbuseFilter use EditFilterMergedContent instead of EditFilterMerged.

This would probably be "in addition to". Since debian has chosen 1.19 for LTS,
I'm hoping to keep AbuseFilter compatible as long as possible.


> 4) Add hook points to AbuseFilter that allow other extensions to control how
> "variables" are extracted from the present Content object.

Yep.


> 5) make Wikibase provide handlers for these hooks that implement the variable
> extraction suitable for Wikibase Entities. A quick-and-dirty way would be to
> implement a hook function for generating fake wikitext from an Entity.

Yep. It would be great if the EditFilterMergedContent handler could do most of
the same handling that the EditFilterMerged handler currently does (it will
have to, if we want article editing to call that hook, instead of the current
one), but everything else would need to be provided as a variable from the
hooks.


So it sounds like we have a way forward!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to