Last modified: 2012-04-26 23:22:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 30410 - Remove deprecated $wgFilterCallback from core
Remove deprecated $wgFilterCallback from core
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Low trivial (vote)
: 1.20.0 release
Assigned To: Antoine "hashar" Musso (WMF)
: easy, patch, patch-need-review
Depends on:
Blocks: code_quality
  Show dependency treegraph
Reported: 2011-08-16 20:34 UTC by Alexandre Emsenhuber [IAlex]
Modified: 2012-04-26 23:22 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Removal of deprecated $wgFilterCallback (4.42 KB, patch)
2012-02-22 17:43 UTC, Alex Monk
Removal of deprecated $wgFilterCallback (10.50 KB, patch)
2012-03-18 22:17 UTC, Alex Monk

Description Alexandre Emsenhuber [IAlex] 2011-08-16 20:34:14 UTC
$wgFilterCallback should be removed entirely since it duplicates the EditFilter hook. It was added before the hook system existed and has the problem that it can only have one function. No extension use it except to duplicate EditPage::internalAttemptSave() code, so it can be safely removed.
Comment 1 Krinkle 2011-08-24 18:44:34 UTC
Setting milestone for 1.20, low priority but should happen in the next version trunk;
Comment 2 Krinkle 2011-08-24 18:44:55 UTC
Adding keyword 'easy'. I think it's easy, if someone feels like doing it before 1.20 that's fine too.
Comment 3 Krinkle 2011-08-24 18:54:09 UTC
The setting is deprecated since 1.17 (r87584 / r67733)
Comment 4 Alex Monk 2012-02-22 17:43:59 UTC
Created attachment 10069 [details]
Removal of deprecated $wgFilterCallback

Hashar emailed me about a page (Annoying little bugs) linking to a query for easy bugs, and I found this one.

Am I doing this right? (see patch)
Comment 5 Mark A. Hershberger 2012-02-22 19:12:24 UTC
You're doing this right.  I'll get Hashar to review your patch.
Comment 6 Antoine "hashar" Musso (WMF) 2012-02-23 17:12:54 UTC
Assigning bug to me since I will be reviewing this patch :-]
Comment 7 Marcin Cieślak 2012-03-16 17:32:13 UTC
The patch seems fine.

Still some extensions (maybe old) refer to it:

./trunk/extensions/Configure/scripts/findSettings.php:					'wgFilterCallback',            // Needs PHP code
./trunk/extensions/Form/Form.body.php:		global $wgSpamRegex, $wgFilterCallback, $wgUser, $wgMaxArticleSize, $wgOut;
./trunk/extensions/Form/Form.body.php:		} elseif ( $wgFilterCallback && $wgFilterCallback( $nt, $text, 0 ) ) {
./trunk/extensions/Postcomment/Postcomment.php:		global $wgFilterCallback, $wgWhitelistEdit;
./trunk/extensions/Postcomment/Postcomment.php:		if ( $wgFilterCallback && $wgFilterCallback( $t, $text, $tmp) ) {
./trunk/extensions/MirrorTools/MirrorTools.classes.php:		global $wgFilterCallback, $wgUser, $wgOut, $wgParser;
./trunk/extensions/MirrorTools/MirrorTools.classes.php:		if ( $wgFilterCallback && $wgFilterCallback( $this->mTitle, $this->textbox1, $this->section, $this->hookError, $this->summary ) ) {

What's interesting they are rather invoking it (not setting a filter).

A RELEASE NOTES entry would be nice as well.
Comment 8 Alex Monk 2012-03-18 22:17:35 UTC
Created attachment 10261 [details]
Removal of deprecated $wgFilterCallback

This, like the last patch, also removes the API 'filtered' error and EditPage::AS_FILTERING. This time it should fix extensions as well.

Note You need to log in before you can comment on or make changes to this bug.