Rename 'hiderevision' to 'suppressrevision'
authorAaron Schulz <aaron@users.mediawiki.org>
Sun, 25 May 2008 00:31:28 +0000 (00:31 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sun, 25 May 2008 00:31:28 +0000 (00:31 +0000)
includes/Article.php
includes/ChangesList.php
includes/FileDeleteForm.php
includes/LogEventsList.php
includes/Revision.php
includes/SpecialRevisiondelete.php
includes/SpecialUndelete.php
includes/filerepo/ArchivedFile.php
includes/filerepo/OldLocalFile.php

index 2099d4d..959924f 100644 (file)
@@ -2019,8 +2019,7 @@ class Article {
                        $reason = $this->DeleteReason;
                }
                # Flag to hide all contents of the archived revisions
-               $suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed('deleterevision') 
-                       && $wgUser->isAllowed('hiderevision');
+               $suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed('suppressrevision');
 
                # This code desperately needs to be totally rewritten
 
@@ -2171,7 +2170,7 @@ class Article {
                $wgOut->setRobotpolicy( 'noindex,nofollow' );
                $wgOut->addWikiMsg( 'confirmdeletetext' );
 
-               if( $wgUser->isAllowed( 'deleterevision' ) && $wgUser->isAllowed( 'hiderevision' ) ) {
+               if( $wgUser->isAllowed( 'suppressrevision' ) ) {
                        $suppress = "<tr id=\"wpDeleteSuppressRow\" name=\"wpDeleteSuppressRow\"><td></td><td>";
                        $suppress .= Xml::checkLabel( wfMsg( 'revdelete-suppress' ), 'wpSuppress', 'wpSuppress', false, array( 'tabindex' => '2' ) );
                        $suppress .= "</td></tr>";
index 540d1f9..e8d1f53 100644 (file)
@@ -288,7 +288,7 @@ class ChangesList {
                if( ( $rc->mAttribs['rc_deleted'] & $field ) == $field ) {
                        global $wgUser;
                        $permission = ( $rc->mAttribs['rc_deleted'] & Revision::DELETED_RESTRICTED ) == Revision::DELETED_RESTRICTED
-                               ? 'hiderevision'
+                               ? 'suppressrevision'
                                : 'deleterevision';
                        wfDebug( "Checking for $permission due to $field match on $rc->mAttribs['rc_deleted']\n" );
                        return $wgUser->isAllowed( $permission );
index 2debd4c..bc80c2b 100644 (file)
@@ -45,8 +45,7 @@ class FileDeleteForm {
                $this->oldimage = $wgRequest->getText( 'oldimage', false );
                $token = $wgRequest->getText( 'wpEditToken' );
                # Flag to hide all contents of the archived revisions
-               $suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed('deleterevision') 
-                       && $wgUser->isAllowed('hiderevision');
+               $suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed('suppressrevision');
 
                if( $this->oldimage && !self::isValidOldSpec($this->oldimage) ) {
                        $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars( $this->oldimage ) );
@@ -127,7 +126,7 @@ class FileDeleteForm {
                global $wgOut, $wgUser, $wgRequest, $wgContLang;
                $align = $wgContLang->isRtl() ? 'left' : 'right';
 
-               if( $wgUser->isAllowed( 'deleterevision' ) && $wgUser->isAllowed( 'hiderevision' ) ) {
+               if( $wgUser->isAllowed( 'suppressrevision' ) ) {
                        $suppress = "<tr id=\"wpDeleteSuppressRow\" name=\"wpDeleteSuppressRow\"><td></td><td>";
                        $suppress .= Xml::checkLabel( wfMsg( 'revdelete-suppress' ), 'wpSuppress', 'wpSuppress', false, array( 'tabindex' => '2' ) );
                        $suppress .= "</td></tr>";
index b85c9de..a48c9da 100644 (file)
@@ -338,7 +338,7 @@ class LogEventsList {
                if( ( $row->log_deleted & $field ) == $field ) {
                        global $wgUser;
                        $permission = ( $row->log_deleted & LogPage::DELETED_RESTRICTED ) == LogPage::DELETED_RESTRICTED
-                               ? 'hiderevision'
+                               ? 'suppressrevision'
                                : 'deleterevision';
                        wfDebug( "Checking for $permission due to $field match on $row->log_deleted\n" );
                        return $wgUser->isAllowed( $permission );
index 267691f..8058e61 100644 (file)
@@ -890,7 +890,7 @@ class Revision {
                if( ( $this->mDeleted & $field ) == $field ) {
                        global $wgUser;
                        $permission = ( $this->mDeleted & self::DELETED_RESTRICTED ) == self::DELETED_RESTRICTED
-                               ? 'hiderevision'
+                               ? 'suppressrevision'
                                : 'deleterevision';
                        wfDebug( "Checking for $permission due to $field match on $this->mDeleted\n" );
                        return $wgUser->isAllowed( $permission );
index 337fffd..92a3612 100644 (file)
@@ -80,7 +80,7 @@ class RevisionDeleteForm {
                        $oimage->load();
                        // Check if user is allowed to see this file
                        if( !$oimage->userCan(File::DELETED_FILE) ) {
-                               $wgOut->permissionRequired( 'hiderevision' );
+                               $wgOut->permissionRequired( 'suppressrevision' );
                        } else {
                                $this->showFile( $file );
                        }
@@ -134,7 +134,7 @@ class RevisionDeleteForm {
                        $hide_content_name,
                        array( 'revdelete-hide-comment', 'wpHideComment', Revision::DELETED_COMMENT ),
                        array( 'revdelete-hide-user', 'wpHideUser', Revision::DELETED_USER ) );
-               if( $wgUser->isAllowed('hiderevision') ) {
+               if( $wgUser->isAllowed('suppressrevision') ) {
                        $this->checks[] = array( 'revdelete-hide-restricted', 'wpHideRestricted', Revision::DELETED_RESTRICTED );
                }
        }
@@ -198,7 +198,7 @@ class RevisionDeleteForm {
                                } else if( !$revObjs[$revid]->userCan(Revision::DELETED_RESTRICTED) ) {
                                // If a rev is hidden from sysops
                                        if( $action != 'submit') {
-                                               $wgOut->permissionRequired( 'hiderevision' );
+                                               $wgOut->permissionRequired( 'suppressrevision' );
                                                return;
                                        }
                                        $UserAllowed = false;
@@ -239,7 +239,7 @@ class RevisionDeleteForm {
                                } else if( !$revObjs[$timestamp]->userCan(Revision::DELETED_RESTRICTED) ) {
                                // If a rev is hidden from sysops
                                        if( $action != 'submit') {
-                                               $wgOut->permissionRequired( 'hiderevision' );
+                                               $wgOut->permissionRequired( 'suppressrevision' );
                                                return;
                                        }
                                        $UserAllowed = false;
@@ -344,7 +344,7 @@ class RevisionDeleteForm {
                                } else if( !$filesObjs[$archivename]->userCan(File::DELETED_RESTRICTED) ) {
                                        // If a rev is hidden from sysops
                                        if( $action != 'submit' ) {
-                                               $wgOut->permissionRequired( 'hiderevision' );
+                                               $wgOut->permissionRequired( 'suppressrevision' );
                                                return;
                                        }
                                        $UserAllowed = false;
@@ -375,7 +375,7 @@ class RevisionDeleteForm {
                                } else if( !$filesObjs[$fileid]->userCan(File::DELETED_RESTRICTED) ) {
                                        // If a rev is hidden from sysops
                                        if( $action != 'submit' ) {
-                                               $wgOut->permissionRequired( 'hiderevision' );
+                                               $wgOut->permissionRequired( 'suppressrevision' );
                                                return;
                                        }
                                        $UserAllowed = false;
@@ -473,7 +473,7 @@ class RevisionDeleteForm {
                        } else if( !LogEventsList::userCan( $logRows[$logid],Revision::DELETED_RESTRICTED) ) {
                        // If an event is hidden from sysops
                                if( $action != 'submit') {
-                                       $wgOut->permissionRequired( 'hiderevision' );
+                                       $wgOut->permissionRequired( 'suppressrevision' );
                                        return;
                                }
                                $UserAllowed = false;
@@ -708,8 +708,8 @@ class RevisionDeleteForm {
                $bitfield = $this->extractBitfield( $request );
                $comment = $request->getText( 'wpReason' );
                # Can the user set this field?
-               if( $bitfield & Revision::DELETED_RESTRICTED && !$wgUser->isAllowed('hiderevision') ) {
-                       $wgOut->permissionRequired( 'hiderevision' );
+               if( $bitfield & Revision::DELETED_RESTRICTED && !$wgUser->isAllowed('suppressrevision') ) {
+                       $wgOut->permissionRequired( 'suppressrevision' );
                        return false;
                }
                # If the save went through, go to success message. Otherwise
@@ -844,7 +844,7 @@ class RevisionDeleter {
                // Where all revs allowed to be set?
                if( !$userAllowedAll ) {
                        //FIXME: still might be confusing???
-                       $wgOut->permissionRequired( 'hiderevision' );
+                       $wgOut->permissionRequired( 'suppressrevision' );
                        return false;
                }
 
@@ -914,7 +914,7 @@ class RevisionDeleter {
                }
                // Where all revs allowed to be set?
                if( !$userAllowedAll ) {
-                       $wgOut->permissionRequired( 'hiderevision' );
+                       $wgOut->permissionRequired( 'suppressrevision' );
                        return false;
                }
 
@@ -1006,7 +1006,7 @@ class RevisionDeleter {
                }
                // Where all revs allowed to be set?
                if( !$userAllowedAll ) {
-                       $wgOut->permissionRequired( 'hiderevision' );
+                       $wgOut->permissionRequired( 'suppressrevision' );
                        return false;
                }
 
@@ -1062,7 +1062,7 @@ class RevisionDeleter {
                }
                // Where all revs allowed to be set?
                if( !$userAllowedAll ) {
-                       $wgOut->permissionRequired( 'hiderevision' );
+                       $wgOut->permissionRequired( 'suppressrevision' );
                        return false;
                }
 
@@ -1121,7 +1121,7 @@ class RevisionDeleter {
                }
                // Were all revs allowed to be set?
                if( !$userAllowedAll ) {
-                       $wgOut->permissionRequired( 'hiderevision' );
+                       $wgOut->permissionRequired( 'suppressrevision' );
                        return false;
                }
 
index 85dbbba..2adbbb0 100644 (file)
@@ -588,7 +588,7 @@ class UndeleteForm {
                $this->mPreview = $request->getCheck( 'preview' ) && $posted;
                $this->mDiff = $request->getCheck( 'diff' );
                $this->mComment = $request->getText( 'wpComment' );
-               $this->mUnsuppress = $request->getVal( 'wpUnsuppress' ) && $wgUser->isAllowed( 'hiderevision' );
+               $this->mUnsuppress = $request->getVal( 'wpUnsuppress' ) && $wgUser->isAllowed( 'suppressrevision' );
 
                if( $par != "" ) {
                        $this->mTarget = $par;
@@ -653,7 +653,7 @@ class UndeleteForm {
                        $file = new ArchivedFile( $this->mTargetObj, '', $this->mFile );
                        // Check if user is allowed to see this file
                        if( !$file->userCan( File::DELETED_FILE ) ) {
-                               $wgOut->permissionRequired( 'hiderevision' );
+                               $wgOut->permissionRequired( 'suppressrevision' );
                                return false;
                        } else {
                                return $this->showFile( $this->mFile );
@@ -967,13 +967,13 @@ class UndeleteForm {
                if( $this->mAllowed && ( $haveRevisions || $haveFiles ) ) {
                        # Format the user-visible controls (comment field, submission button)
                        # in a nice little table
-                       if( $wgUser->isAllowed( 'hiderevision' ) ) {
+                       if( $wgUser->isAllowed( 'suppressrevision' ) ) {
                                $unsuppressBox =
                                        "<tr>
                                                <td>&nbsp;</td>
                                                <td class='mw-input'>" .
                                                        Xml::checkLabel( wfMsg('revdelete-unsuppress'), 'wpUnsuppress',
-                                                               'mw-undelete-unsupress', $this->mUnsuppress ).
+                                                               'mw-undelete-unsuppress', $this->mUnsuppress ).
                                                "</td>
                                        </tr>";
                        } else {
index 7402c15..646256b 100644 (file)
@@ -333,7 +333,7 @@ class ArchivedFile
                if( ($this->deleted & $field) == $field ) {
                        global $wgUser;
                        $permission = ( $this->deleted & File::DELETED_RESTRICTED ) == File::DELETED_RESTRICTED
-                               ? 'hiderevision'
+                               ? 'suppressrevision'
                                : 'deleterevision';
                        wfDebug( "Checking for $permission due to $field match on $this->deleted\n" );
                        return $wgUser->isAllowed( $permission );
index c495aaf..60e90f1 100644 (file)
@@ -166,7 +166,7 @@ class OldLocalFile extends LocalFile {
                if( isset($this->deleted) && ($this->deleted & $field) == $field ) {
                        global $wgUser;
                        $permission = ( $this->deleted & File::DELETED_RESTRICTED ) == File::DELETED_RESTRICTED
-                               ? 'hiderevision'
+                               ? 'suppressrevision'
                                : 'deleterevision';
                        wfDebug( "Checking for $permission due to $field match on $this->mDeleted\n" );
                        return $wgUser->isAllowed( $permission );