mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
Show syntax error message in an error box on Special:AbuseFilter/test
Otherwise it's barely noticable. Change-Id: Iff10036996c9e190c850d0b24f3ea0817624b95f
This commit is contained in:
parent
60e03c965e
commit
3b5b3cbae7
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace MediaWiki\Extension\AbuseFilter\View;
|
||||
|
||||
use Html;
|
||||
use HTMLForm;
|
||||
use IContextSource;
|
||||
use LogEventsList;
|
||||
|
@ -217,7 +218,9 @@ class AbuseFilterViewTestBatch extends AbuseFilterView {
|
|||
$ruleChecker = $this->ruleCheckerFactory->newRuleChecker();
|
||||
|
||||
if ( !$ruleChecker->checkSyntax( $this->testPattern )->isValid() ) {
|
||||
$out->addWikiMsg( 'abusefilter-test-syntaxerr' );
|
||||
$out->addHTML(
|
||||
Html::errorBox( $this->msg( 'abusefilter-test-syntaxerr' )->parse() )
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue