$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
$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>";
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 );
$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 ) );
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>";
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 );
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 );
$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 );
}
$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 );
}
}
} 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;
} 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;
} 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;
} 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;
} 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;
$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
// Where all revs allowed to be set?
if( !$userAllowedAll ) {
//FIXME: still might be confusing???
- $wgOut->permissionRequired( 'hiderevision' );
+ $wgOut->permissionRequired( 'suppressrevision' );
return false;
}
}
// Where all revs allowed to be set?
if( !$userAllowedAll ) {
- $wgOut->permissionRequired( 'hiderevision' );
+ $wgOut->permissionRequired( 'suppressrevision' );
return false;
}
}
// Where all revs allowed to be set?
if( !$userAllowedAll ) {
- $wgOut->permissionRequired( 'hiderevision' );
+ $wgOut->permissionRequired( 'suppressrevision' );
return false;
}
}
// Where all revs allowed to be set?
if( !$userAllowedAll ) {
- $wgOut->permissionRequired( 'hiderevision' );
+ $wgOut->permissionRequired( 'suppressrevision' );
return false;
}
}
// Were all revs allowed to be set?
if( !$userAllowedAll ) {
- $wgOut->permissionRequired( 'hiderevision' );
+ $wgOut->permissionRequired( 'suppressrevision' );
return false;
}
$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;
$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 );
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> </td>
<td class='mw-input'>" .
Xml::checkLabel( wfMsg('revdelete-unsuppress'), 'wpUnsuppress',
- 'mw-undelete-unsupress', $this->mUnsuppress ).
+ 'mw-undelete-unsuppress', $this->mUnsuppress ).
"</td>
</tr>";
} else {
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 );
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 );