2016-06-04 13:33:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class AbuseFilterModifyLogFormatter extends LogFormatter {
|
|
|
|
|
2017-10-20 17:46:31 +00:00
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
2016-06-04 13:33:32 +00:00
|
|
|
protected function getMessageKey() {
|
2017-10-16 11:19:30 +00:00
|
|
|
$subtype = $this->entry->getSubtype();
|
|
|
|
// Messages that can be used here:
|
|
|
|
// * abusefilter-logentry-create
|
|
|
|
// * abusefilter-logentry-modify
|
|
|
|
return "abusefilter-logentry-$subtype";
|
2016-06-04 13:33:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|