* @since 1.22
*/
+use MediaWiki\MediaWikiServices;
+use MediaWiki\Storage\RevisionRecord;
+
/**
* This class formats delete log entries.
*
public function getActionLinks() {
$user = $this->context->getUser();
$linkRenderer = $this->getLinkRenderer();
- if ( !$user->isAllowed( 'deletedhistory' )
+ $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+ if ( !$permissionManager->userHasRight( $user, 'deletedhistory' )
|| $this->entry->isDeleted( LogPage::DELETED_ACTION )
) {
return '';
switch ( $this->entry->getSubtype() ) {
case 'delete': // Show undelete link
case 'delete_redir':
- if ( $user->isAllowed( 'undelete' ) ) {
+ if ( $permissionManager->userHasRight( $user, 'undelete' ) ) {
$message = 'undeletelink';
} else {
$message = 'undeleteviewlink';
];
static $fields = [
- Revision::DELETED_TEXT => 'content',
- Revision::DELETED_COMMENT => 'comment',
- Revision::DELETED_USER => 'user',
- Revision::DELETED_RESTRICTED => 'restricted',
+ RevisionRecord::DELETED_TEXT => 'content',
+ RevisionRecord::DELETED_COMMENT => 'comment',
+ RevisionRecord::DELETED_USER => 'user',
+ RevisionRecord::DELETED_RESTRICTED => 'restricted',
];
if ( isset( $rawParams['6::ofield'] ) ) {