65 $contentModelChange = ( $this->newContentModel !== $this->title->getContentModel() );
70 if ( $this->user->pingLimiter()
71 || $this->user->pingLimiter(
'linkpurge', 0 )
72 || ( $contentModelChange && $this->user->pingLimiter(
'editcontentmodel' ) )
74 $this->result = self::CONSTRAINT_FAILED;
76 $this->result = self::CONSTRAINT_PASSED;
85 if ( $this->result === self::CONSTRAINT_FAILED ) {
86 $statusValue->
fatal(
'actionthrottledtext' );
87 $statusValue->value = self::AS_RATE_LIMITED;
Verify user doesn't exceed rate limits.
getLegacyStatus()
Get the legacy status for failure (or success)
__construct(User $user, Title $title, string $newContentModel)
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.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Interface for all constraints that can prevent edits.