(bug 42064) Make EditFilterMergedContent more generic.
authordaniel <daniel.kinzler@wikimedia.de>
Thu, 3 Jan 2013 10:30:46 +0000 (11:30 +0100)
committerdaniel <daniel.kinzler@wikimedia.de>
Mon, 7 Jan 2013 13:01:07 +0000 (14:01 +0100)
commit9a0e7bb6b7fffe0b8449a11ad1db29a34c0dd1e7
treeea8aba94c8d4449d7be6ade56154682bb7aa9093
parentf83c0600b800f309c1dd3b016b8b48addfc019fc
(bug 42064) Make EditFilterMergedContent more generic.

This is part a the solution to bug 42064: it modifies the EditFilterMergedContent hook
to allow it to be triggered by code outside the EditPage. This is useful when extensions
such as Wikibase implement their own editing mechanism for non-textual content.

Allowing EditFilterMergedContent to be used on non-textual content ensures that
any filters will also be applied to that content.

Note that EditFilterMergedContent was introduced in 1.21 which hasn't been released yet,
so modifying the hooks definition should not be a problem. The only extension that appears
to use the EditFilterMergedContent hook is Translate. I'll supply a patch.

To completely fix bug 42064, I will soon submit two changes to two extensions:

* In the Wikibase extension, trigger the EditFilterMergedContent when changing data
entities.

* In AbuseFilter, make use of the EditFilterMergedContent hook, so filters will also be
applied to non-textual content.

The the dicsussion on bugzilla for the rationale of this architecture.

Change-Id: I99a19c93e99860a91d7f898b0a3fbb72b69baab8
docs/hooks.txt
includes/EditPage.php