-
- $oldid = $this->oldTitle->getArticleID();
-
- if ( $this->newTitle->getDBkey() === '' ) {
- $status->fatal( 'articleexists' );
- }
- if (
- ( $this->oldTitle->getDBkey() == '' ) ||
- ( !$oldid ) ||
- ( $this->newTitle->getDBkey() == '' )
- ) {
- $status->fatal( 'badarticleerror' );
- }
-
- # The move is allowed only if (1) the target doesn't exist, or
- # (2) the target is a redirect to the source, and has no history
- # (so we can undo bad moves right after they're done).
- if ( $this->newTitle->getArticleID() && !$this->isValidMoveTarget() ) {
- $status->fatal( 'articleexists' );