For Wikidata, this causes users to be unable to create items. (bug 59797)
In case of Special:NewItem, $context->getWikiPage() does
$context->getTitle() to get the special page and then WikiPage::factory
with the special page $title. special page does not make a valid
WikiPage and throws an exception.
Previously, $title = special page and was used in getParserOutput.
$title is invalid there but Wikibase never used that variable.
Would be good to make sure $title is actually related to the content.
This reverts commit 508a3706d6.
Change-Id: Ib24515be6e76d3f29e2f9048fbb81e5a25b5857a
Using WikiPage::prepareContentForEdit instead of
Content::getParserOutput allows us to share the cached parser output
with other hooks that run during the edit process.
Note SpamBlacklistHooks::filterAPIEditBeforeSave already does this.
Bug: 57026
Change-Id: I8c8b293af2842411fd95d3bc21e966a72b2a78b4
This changes SpamBlacklist to make use of the new, ContentHandler
aware hooks.
This change also includes some refactoring and cleanup which made
the migration to the new hooks easier.
Change-Id: I21e9cc8479f2b95fb53c502f6e279c8a1ea378a5
provide all blocked URLs").
SpamBlacklist extension to provide all matched URLs to
spamPageWithContent() rather than just one. Performance
hit negligible and zero for all edits that don't hit the
SpamBlacklist (99.999%+).
DEPENDENT ON OTHER HALF OF FIX (now in core):
https://gerrit.wikimedia.org/r/3740
Change-Id: Ia951d5795c5cedb6c3876be89f8a08f110004102