* @file
*/
+use MediaWiki\Storage\RevisionRecord;
+
/**
* A module that allows for editing and creating pages.
*
$oldTitle = $titleObj;
$titles = Revision::newFromTitle( $oldTitle, false, Revision::READ_LATEST )
- ->getContent( Revision::FOR_THIS_USER, $user )
+ ->getContent( RevisionRecord::FOR_THIS_USER, $user )
->getRedirectChain();
// array_shift( $titles );
$undoafterRev = Revision::newFromId( $params['undoafter'] );
}
$undoRev = Revision::newFromId( $params['undo'] );
- if ( is_null( $undoRev ) || $undoRev->isDeleted( Revision::DELETED_TEXT ) ) {
+ if ( is_null( $undoRev ) || $undoRev->isDeleted( RevisionRecord::DELETED_TEXT ) ) {
$this->dieWithError( [ 'apierror-nosuchrevid', $params['undo'] ] );
}
if ( $params['undoafter'] == 0 ) {
$undoafterRev = $undoRev->getPrevious();
}
- if ( is_null( $undoafterRev ) || $undoafterRev->isDeleted( Revision::DELETED_TEXT ) ) {
+ if ( is_null( $undoafterRev ) || $undoafterRev->isDeleted( RevisionRecord::DELETED_TEXT ) ) {
$this->dieWithError( [ 'apierror-nosuchrevid', $params['undoafter'] ] );
}