mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Merge "Really disable the minor_edit variable"
This commit is contained in:
commit
e6ca0f288d
|
@ -381,7 +381,7 @@
|
|||
"abusefilter-edit-builder-vars-old-text-stripped": "Old page text, stripped of any markup",
|
||||
"abusefilter-edit-builder-vars-old-links": "Links in the page, before the edit",
|
||||
"abusefilter-edit-builder-vars-old-html": "Old page wikitext, parsed into HTML (no more in use)",
|
||||
"abusefilter-edit-builder-vars-minor-edit": "Whether or not the edit is marked as minor",
|
||||
"abusefilter-edit-builder-vars-minor-edit": "Whether or not the edit is marked as minor (no more in use)",
|
||||
"abusefilter-edit-builder-vars-file-sha1": "SHA1 hash of file contents",
|
||||
"abusefilter-edit-builder-vars-file-size": "Size of the file in bytes",
|
||||
"abusefilter-edit-builder-vars-file-mime": "MIME type of the file",
|
||||
|
|
|
@ -161,7 +161,6 @@ class AbuseFilter {
|
|||
'moved_to_recent_contributors' => 'movedto-recent-contributors',
|
||||
'moved_to_first_contributor' => 'movedto-first-contributor',
|
||||
'old_links' => 'old-links',
|
||||
'minor_edit' => 'minor-edit',
|
||||
'file_sha1' => 'file-sha1',
|
||||
'file_size' => 'file-size',
|
||||
'file_mime' => 'file-mime',
|
||||
|
@ -175,7 +174,8 @@ class AbuseFilter {
|
|||
/** @var array Old vars which aren't in use anymore */
|
||||
public static $disabledVars = [
|
||||
'old_text' => 'old-text-stripped',
|
||||
'old_html' => 'old-html'
|
||||
'old_html' => 'old-html',
|
||||
'minor_edit' => 'minor-edit'
|
||||
];
|
||||
|
||||
public static $deprecatedVars = [
|
||||
|
|
|
@ -822,7 +822,6 @@ class AbuseFilterHooks {
|
|||
|
||||
// Load vars for filters to check
|
||||
$vars->setVar( 'summary', $summary );
|
||||
$vars->setVar( 'minor_edit', false );
|
||||
$vars->setVar( 'old_wikitext', $oldtext );
|
||||
$vars->setVar( 'new_wikitext', $text );
|
||||
// TODO: set old_content and new_content vars, use them
|
||||
|
|
|
@ -13,11 +13,6 @@ class AbuseFilterVariableHolder {
|
|||
*/
|
||||
public $mVarsVersion = 2;
|
||||
|
||||
public function __construct() {
|
||||
// Backwards-compatibility (unused now)
|
||||
$this->setVar( 'minor_edit', false );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $variable
|
||||
* @param mixed $datum
|
||||
|
@ -63,6 +58,9 @@ class AbuseFilterVariableHolder {
|
|||
} elseif ( $this->mVars[$variable] instanceof AFPData ) {
|
||||
return $this->mVars[$variable];
|
||||
}
|
||||
} elseif ( array_key_exists( $variable, AbuseFilter::$disabledVars ) ) {
|
||||
wfWarn( "Disabled variable $variable requested. Please fix the filter as this will " .
|
||||
"be removed soon." );
|
||||
}
|
||||
return new AFPData();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue