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:
|
2021-02-06 14:36:41 +00:00
|
|
|
// abusefilter-parser-warning-match-empty-regex
|
2021-01-10 19:26:01 +00:00
|
|
|
return new Message(
|
2021-02-06 14:36:41 +00:00
|
|
|
'abusefilter-parser-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
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|