mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
70a03755e8
Change-Id: Ica0439db5ec729c3b298db99fd89dd999f491457
55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
|
|
class AbuseFilterModifyLogFormatter extends LogFormatter {
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
protected function getMessageKey() {
|
|
$subtype = $this->entry->getSubtype();
|
|
// Messages that can be used here:
|
|
// * abusefilter-logentry-create
|
|
// * abusefilter-logentry-modify
|
|
return "abusefilter-logentry-$subtype";
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
* @suppress SecurityCheck-DoubleEscaped taint-check false positives
|
|
*/
|
|
protected function extractParameters() {
|
|
$parameters = $this->entry->getParameters();
|
|
if ( $this->entry->isLegacy() ) {
|
|
list( $historyId, $filterId ) = $parameters;
|
|
} else {
|
|
$historyId = $parameters['historyId'];
|
|
$filterId = $parameters['newId'];
|
|
}
|
|
|
|
$detailsTitle = SpecialPage::getTitleFor(
|
|
'AbuseFilter',
|
|
"history/$filterId/diff/prev/$historyId"
|
|
);
|
|
|
|
$params = [];
|
|
$params[3] = Message::rawParam(
|
|
$this->makePageLink(
|
|
$this->entry->getTarget(),
|
|
[],
|
|
$this->msg( 'abusefilter-log-detailedentry-local' )
|
|
->numParams( $filterId )->escaped()
|
|
)
|
|
);
|
|
$params[4] = Message::rawParam(
|
|
$this->makePageLink(
|
|
$detailsTitle,
|
|
[],
|
|
$this->msg( 'abusefilter-log-detailslink' )->escaped()
|
|
)
|
|
);
|
|
|
|
return $params;
|
|
}
|
|
|
|
}
|