34 private bool $deletedSinceLastEdit;
35 private bool $allowRecreation;
42 bool $deletedSinceLastEdit,
45 $this->deletedSinceLastEdit = $deletedSinceLastEdit;
46 $this->allowRecreation = $allowRecreation;
50 if ( $this->deletedSinceLastEdit && !$this->allowRecreation ) {
51 return self::CONSTRAINT_FAILED;
53 return self::CONSTRAINT_PASSED;
58 if ( $this->deletedSinceLastEdit && !$this->allowRecreation ) {
59 $statusValue->
setResult(
false, self::AS_ARTICLE_WAS_DELETED );
if(!defined('MW_SETUP_CALLBACK'))
Make sure user doesn't accidentally recreate a page deleted after they started editing.
__construct(bool $deletedSinceLastEdit, bool $allowRecreation)
getLegacyStatus()
Get the legacy status for failure (or success)
Generic operation result class Has warning/error list, boolean status and arbitrary value.
setResult( $ok, $value=null)
Change operation result.
Interface for all constraints that can prevent edits.