35 private $deletedSinceLastEdit;
38 private $allowRecreation;
45 bool $deletedSinceLastEdit,
48 $this->deletedSinceLastEdit = $deletedSinceLastEdit;
49 $this->allowRecreation = $allowRecreation;
53 if ( $this->deletedSinceLastEdit && !$this->allowRecreation ) {
54 return self::CONSTRAINT_FAILED;
56 return self::CONSTRAINT_PASSED;
61 if ( $this->deletedSinceLastEdit && !$this->allowRecreation ) {
62 $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.