use MediaWiki\MediaWikiServices;
use MediaWiki\Revision\SlotRecord;
+use Wikimedia\Rdbms\IDatabase;
/**
* Handles the backend logic of moving a page from one title
}
$dbw = wfGetDB( DB_MASTER );
- $dbw->startAtomic( __METHOD__ );
+ $dbw->startAtomic( __METHOD__, IDatabase::ATOMIC_CANCELABLE );
Hooks::run( 'TitleMoveStarting', [ $this->oldTitle, $this->newTitle, $user ] );
* Move a file associated with a page to a new location.
* Can also be used to revert after a DB failure.
*
- * @access private
+ * @private
* @param Title Old location to move the file from.
* @param Title New location to move the file to.
* @return Status
);
if ( !$status->isGood() ) {
- throw new MWException( 'Failed to delete page-move revision: ' . $status );
+ throw new MWException( 'Failed to delete page-move revision: '
+ . $status->getWikiText( false, false, 'en' ) );
}
$nt->resetArticleID( false );