* @ingroup SpecialPage
*/
+use MediaWiki\Storage\RevisionRecord;
+
/**
* Special page allowing users with the appropriate permissions to view
* and hide revisions. Log items can also be hidden.
[ $this->typeLabels['check-label'], 'wpHidePrimary',
RevisionDeleter::getRevdelConstant( $this->typeName )
],
- [ 'revdelete-hide-comment', 'wpHideComment', Revision::DELETED_COMMENT ],
- [ 'revdelete-hide-user', 'wpHideUser', Revision::DELETED_USER ]
+ [ 'revdelete-hide-comment', 'wpHideComment', RevisionRecord::DELETED_COMMENT ],
+ [ 'revdelete-hide-user', 'wpHideUser', RevisionRecord::DELETED_USER ]
];
if ( $user->isAllowed( 'suppressrevision' ) ) {
$this->checks[] = [ 'revdelete-hide-restricted',
- 'wpHideRestricted', Revision::DELETED_RESTRICTED ];
+ 'wpHideRestricted', RevisionRecord::DELETED_RESTRICTED ];
}
# Either submit or create our form
$bitfield & $field
);
- if ( $field == Revision::DELETED_RESTRICTED ) {
+ if ( $field == RevisionRecord::DELETED_RESTRICTED ) {
$innerHTML = "<b>$innerHTML</b>";
}
$line .= '<td class="mw-revdel-checkbox">' . Xml::radio( $name, 0, $selected == 0 ) . '</td>';
$line .= '<td class="mw-revdel-checkbox">' . Xml::radio( $name, 1, $selected == 1 ) . '</td>';
$label = $this->msg( $message )->escaped();
- if ( $field == Revision::DELETED_RESTRICTED ) {
+ if ( $field == RevisionRecord::DELETED_RESTRICTED ) {
$label = "<b>$label</b>";
}
$line .= "<td>$label</td>";
. $this->otherReason;
}
# Can the user set this field?
- if ( $bitParams[Revision::DELETED_RESTRICTED] == 1
+ if ( $bitParams[RevisionRecord::DELETED_RESTRICTED] == 1
&& !$this->getUser()->isAllowed( 'suppressrevision' )
) {
throw new PermissionsError( 'suppressrevision' );
}
$bitfield[$field] = $val;
}
- if ( !isset( $bitfield[Revision::DELETED_RESTRICTED] ) ) {
- $bitfield[Revision::DELETED_RESTRICTED] = 0;
+ if ( !isset( $bitfield[RevisionRecord::DELETED_RESTRICTED] ) ) {
+ $bitfield[RevisionRecord::DELETED_RESTRICTED] = 0;
}
return $bitfield;