Merge "Exclude redirects from Special:Fewestrevisions"
[lhc/web/wiklou.git] / includes / specials / SpecialRevisionDelete.php
index 682bceb..7444225 100644 (file)
@@ -21,6 +21,8 @@
  * @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.
@@ -197,12 +199,12 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                        [ $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
@@ -530,7 +532,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                        $bitfield & $field
                                );
 
-                               if ( $field == Revision::DELETED_RESTRICTED ) {
+                               if ( $field == RevisionRecord::DELETED_RESTRICTED ) {
                                        $innerHTML = "<b>$innerHTML</b>";
                                }
 
@@ -561,7 +563,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                $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>";
@@ -599,7 +601,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                . $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' );
@@ -662,8 +664,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                        }
                        $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;