<?php
/**
- * Created on Jun 25, 2013
- *
* Copyright © 2013 Wikimedia Foundation and contributors
*
* This program is free software; you can redistribute it and/or modify
* @since 1.23
*/
+use MediaWiki\Revision\RevisionRecord;
+
/**
* API interface to RevDel. The API equivalent of Special:RevisionDelete.
* Requires API write mode to be enabled.
}
$bits = [
'content' => RevisionDeleter::getRevdelConstant( $params['type'] ),
- 'comment' => Revision::DELETED_COMMENT,
- 'user' => Revision::DELETED_USER,
+ 'comment' => RevisionRecord::DELETED_COMMENT,
+ 'user' => RevisionRecord::DELETED_USER,
];
$bitfield = [];
foreach ( $bits as $key => $bit ) {
if ( $params['suppress'] === 'yes' ) {
$this->checkUserRightsAny( 'suppressrevision' );
- $bitfield[Revision::DELETED_RESTRICTED] = 1;
+ $bitfield[RevisionRecord::DELETED_RESTRICTED] = 1;
} elseif ( $params['suppress'] === 'no' ) {
- $bitfield[Revision::DELETED_RESTRICTED] = 0;
+ $bitfield[RevisionRecord::DELETED_RESTRICTED] = 0;
} else {
- $bitfield[Revision::DELETED_RESTRICTED] = -1;
+ $bitfield[RevisionRecord::DELETED_RESTRICTED] = -1;
}
$targetObj = null;