34 private bool $deletedSinceLastEdit;
35 private bool $allowRecreation;
38 bool $deletedSinceLastEdit,
41 $this->deletedSinceLastEdit = $deletedSinceLastEdit;
42 $this->allowRecreation = $allowRecreation;
46 if ( $this->deletedSinceLastEdit && !$this->allowRecreation ) {
47 return self::CONSTRAINT_FAILED;
49 return self::CONSTRAINT_PASSED;
54 if ( $this->deletedSinceLastEdit && !$this->allowRecreation ) {
55 $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.