2020-12-18 16:53:36 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\AbuseFilter\Parser;
|
|
|
|
|
|
|
|
use Message;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A variant of user-visible exception that is not fatal.
|
|
|
|
*/
|
|
|
|
class UserVisibleWarning extends AFPUserVisibleException {
|
|
|
|
/**
|
|
|
|
* @return Message
|
|
|
|
*/
|
2021-01-10 19:26:01 +00:00
|
|
|
public function getMessageObj() : Message {
|
2020-12-18 16:53:36 +00:00
|
|
|
// Give grep a chance to find the usages:
|
|
|
|
// abusefilter-warning-match-empty-regex
|
2021-01-10 19:26:01 +00:00
|
|
|
return new Message(
|
2020-12-18 16:53:36 +00:00
|
|
|
'abusefilter-warning-' . $this->mExceptionID,
|
2021-01-10 19:26:01 +00:00
|
|
|
array_merge( [ $this->mPosition ], $this->mParams )
|
2020-12-18 16:53:36 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|