38 private $allowBlankSubject;
49 bool $allowBlankSubject
51 $this->subject = $subject;
52 $this->allowBlankSubject = $allowBlankSubject;
56 if ( !$this->allowBlankSubject && trim( $this->subject ) ==
'' ) {
58 $this->result = self::CONSTRAINT_FAILED;
60 $this->result = self::CONSTRAINT_PASSED;
67 if ( $this->result === self::CONSTRAINT_FAILED ) {
72 $statusValue->
fatal(
'missingsummary' );
73 $statusValue->value = self::AS_SUMMARY_NEEDED;
if(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.
For a new section, do not allow the user to post with an empty subject (section title) unless they ch...
getLegacyStatus()
Get the legacy status for failure (or success)
__construct(string $subject, bool $allowBlankSubject)
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.
Interface for all constraints that can prevent edits.