mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Fix params to ParserOutputStashForEdit
$summary and $user are always guaranteed to be passed, and $user is guaranteed to be a User object. Hence, update the hook handler to reflect that. Change-Id: I3a7fcb074b460b77210de5a6bad43f500aff3249
This commit is contained in:
parent
8dbbe859e7
commit
0119108ee7
|
@ -999,10 +999,10 @@ class AbuseFilterHooks {
|
|||
* @param Content $content
|
||||
* @param ParserOutput $output
|
||||
* @param string $summary
|
||||
* @param User|null $user
|
||||
* @param User $user
|
||||
*/
|
||||
public static function onParserOutputStashForEdit(
|
||||
WikiPage $page, Content $content, ParserOutput $output, $summary = '', $user = null
|
||||
WikiPage $page, Content $content, ParserOutput $output, $summary, User $user
|
||||
) {
|
||||
$startTime = microtime( true );
|
||||
$oldRevision = $page->getRevision();
|
||||
|
@ -1011,7 +1011,6 @@ class AbuseFilterHooks {
|
|||
}
|
||||
|
||||
$oldContent = $oldRevision->getContent( Revision::RAW );
|
||||
$user = $user ?: RequestContext::getMain()->getUser();
|
||||
$oldAfText = AbuseFilter::revisionToString( $oldRevision, $user );
|
||||
|
||||
// XXX: This makes the assumption that this method is only ever called for the main slot.
|
||||
|
|
Loading…
Reference in a new issue