mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
173bd089b3
It was executed on WMF wikis, and since they were the only affected wikis we can remove the script. Also remove a temporary back-compat check in the log formatter. Bug: T231131 Change-Id: I534acd9c86894eb1bdd96331e9fa85afc7502f88
32 lines
824 B
PHP
32 lines
824 B
PHP
<?php
|
|
|
|
class AbuseFilterRightsLogFormatter extends LogFormatter {
|
|
|
|
/**
|
|
* This method is identical to the parent, but it's redeclared to give grep a chance
|
|
* to find the messages.
|
|
* @inheritDoc
|
|
*/
|
|
protected function getMessageKey() {
|
|
$subtype = $this->entry->getSubtype();
|
|
// Messages that can be used here:
|
|
// * logentry-rights-blockautopromote
|
|
// * logentry-rights-restoreautopromote
|
|
return "logentry-rights-$subtype";
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
protected function extractParameters() {
|
|
$ret = [];
|
|
$ret[3] = $this->entry->getTarget()->getText();
|
|
if ( $this->entry->getSubType() === 'blockautopromote' ) {
|
|
$parameters = $this->entry->getParameters();
|
|
$duration = $parameters['7::duration'];
|
|
$ret[4] = $this->context->getLanguage()->formatDuration( $duration );
|
|
}
|
|
return $ret;
|
|
}
|
|
}
|