mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
Remove unnecessary check for MW_SUPPORTS_CONTENTHANDLER
This extension already requires 1.23+ Change-Id: Id9f0c44cdd55ec024eb9cacb4d5b6e02546aea07
This commit is contained in:
parent
622be7f9de
commit
b4748f25ad
|
@ -2204,16 +2204,13 @@ class AbuseFilter {
|
|||
if ( !$revision instanceof Revision ) {
|
||||
return '';
|
||||
}
|
||||
if ( defined( 'MW_SUPPORTS_CONTENTHANDLER' ) ) {
|
||||
$content = $revision->getContent( $audience );
|
||||
if ( $content === null ) {
|
||||
return '';
|
||||
}
|
||||
$result = self::contentToString( $content );
|
||||
} else {
|
||||
// For MediaWiki without contenthandler support (< 1.21)
|
||||
$result = $revision->getText();
|
||||
|
||||
$content = $revision->getContent( $audience );
|
||||
if ( $content === null ) {
|
||||
return '';
|
||||
}
|
||||
$result = self::contentToString( $content );
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue