24use Psr\Log\LoggerInterface;
61 $this->input = $inputText;
67 if ( $this->input ===
'' ) {
68 return self::CONSTRAINT_PASSED;
71 '{name} editing "{title}" submitted bogus field "{input}"',
73 'name' => $this->user->getName(),
74 'title' => $this->title->getPrefixedText(),
75 'input' => $this->input
78 return self::CONSTRAINT_FAILED;
83 if ( $this->input !==
'' ) {
84 $statusValue->
fatal(
'spamprotectionmatch',
false );
85 $statusValue->value = self::AS_SPAM_ERROR;
if(ini_get('mbstring.func_overload')) if(!defined('MW_ENTRY_POINT'))
Pre-config setup: Before loading LocalSettings.php.
Verify simple anti spam measure of an extra hidden text field.
getLegacyStatus()
Get the legacy status for failure (or success)
__construct(LoggerInterface $logger, string $inputText, UserIdentity $user, Title $title)
Generic operation result class Has warning/error list, boolean status and arbitrary value.
fatal( $message,... $parameters)
Add an error and set OK to false, indicating that the operation as a whole was fatal.
Represents a title within MediaWiki.
Interface for all constraints that can prevent edits.