| Index: trunk/phase3/includes/Article.php |
| — | — | @@ -2019,8 +2019,7 @@ |
| 2020 | 2020 | $reason = $this->DeleteReason; |
| 2021 | 2021 | } |
| 2022 | 2022 | # Flag to hide all contents of the archived revisions |
| 2023 | | - $suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed('deleterevision') |
| 2024 | | - && $wgUser->isAllowed('hiderevision'); |
| | 2023 | + $suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed('suppressrevision'); |
| 2025 | 2024 | |
| 2026 | 2025 | # This code desperately needs to be totally rewritten |
| 2027 | 2026 | |
| — | — | @@ -2171,7 +2170,7 @@ |
| 2172 | 2171 | $wgOut->setRobotpolicy( 'noindex,nofollow' ); |
| 2173 | 2172 | $wgOut->addWikiMsg( 'confirmdeletetext' ); |
| 2174 | 2173 | |
| 2175 | | - if( $wgUser->isAllowed( 'deleterevision' ) && $wgUser->isAllowed( 'hiderevision' ) ) { |
| | 2174 | + if( $wgUser->isAllowed( 'suppressrevision' ) ) { |
| 2176 | 2175 | $suppress = "<tr id=\"wpDeleteSuppressRow\" name=\"wpDeleteSuppressRow\"><td></td><td>"; |
| 2177 | 2176 | $suppress .= Xml::checkLabel( wfMsg( 'revdelete-suppress' ), 'wpSuppress', 'wpSuppress', false, array( 'tabindex' => '2' ) ); |
| 2178 | 2177 | $suppress .= "</td></tr>"; |
| Index: trunk/phase3/includes/SpecialRevisiondelete.php |
| — | — | @@ -80,7 +80,7 @@ |
| 81 | 81 | $oimage->load(); |
| 82 | 82 | // Check if user is allowed to see this file |
| 83 | 83 | if( !$oimage->userCan(File::DELETED_FILE) ) { |
| 84 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 84 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 85 | 85 | } else { |
| 86 | 86 | $this->showFile( $file ); |
| 87 | 87 | } |
| — | — | @@ -134,7 +134,7 @@ |
| 135 | 135 | $hide_content_name, |
| 136 | 136 | array( 'revdelete-hide-comment', 'wpHideComment', Revision::DELETED_COMMENT ), |
| 137 | 137 | array( 'revdelete-hide-user', 'wpHideUser', Revision::DELETED_USER ) ); |
| 138 | | - if( $wgUser->isAllowed('hiderevision') ) { |
| | 138 | + if( $wgUser->isAllowed('suppressrevision') ) { |
| 139 | 139 | $this->checks[] = array( 'revdelete-hide-restricted', 'wpHideRestricted', Revision::DELETED_RESTRICTED ); |
| 140 | 140 | } |
| 141 | 141 | } |
| — | — | @@ -198,7 +198,7 @@ |
| 199 | 199 | } else if( !$revObjs[$revid]->userCan(Revision::DELETED_RESTRICTED) ) { |
| 200 | 200 | // If a rev is hidden from sysops |
| 201 | 201 | if( $action != 'submit') { |
| 202 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 202 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 203 | 203 | return; |
| 204 | 204 | } |
| 205 | 205 | $UserAllowed = false; |
| — | — | @@ -239,7 +239,7 @@ |
| 240 | 240 | } else if( !$revObjs[$timestamp]->userCan(Revision::DELETED_RESTRICTED) ) { |
| 241 | 241 | // If a rev is hidden from sysops |
| 242 | 242 | if( $action != 'submit') { |
| 243 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 243 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 244 | 244 | return; |
| 245 | 245 | } |
| 246 | 246 | $UserAllowed = false; |
| — | — | @@ -344,7 +344,7 @@ |
| 345 | 345 | } else if( !$filesObjs[$archivename]->userCan(File::DELETED_RESTRICTED) ) { |
| 346 | 346 | // If a rev is hidden from sysops |
| 347 | 347 | if( $action != 'submit' ) { |
| 348 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 348 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 349 | 349 | return; |
| 350 | 350 | } |
| 351 | 351 | $UserAllowed = false; |
| — | — | @@ -375,7 +375,7 @@ |
| 376 | 376 | } else if( !$filesObjs[$fileid]->userCan(File::DELETED_RESTRICTED) ) { |
| 377 | 377 | // If a rev is hidden from sysops |
| 378 | 378 | if( $action != 'submit' ) { |
| 379 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 379 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 380 | 380 | return; |
| 381 | 381 | } |
| 382 | 382 | $UserAllowed = false; |
| — | — | @@ -473,7 +473,7 @@ |
| 474 | 474 | } else if( !LogEventsList::userCan( $logRows[$logid],Revision::DELETED_RESTRICTED) ) { |
| 475 | 475 | // If an event is hidden from sysops |
| 476 | 476 | if( $action != 'submit') { |
| 477 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 477 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 478 | 478 | return; |
| 479 | 479 | } |
| 480 | 480 | $UserAllowed = false; |
| — | — | @@ -708,8 +708,8 @@ |
| 709 | 709 | $bitfield = $this->extractBitfield( $request ); |
| 710 | 710 | $comment = $request->getText( 'wpReason' ); |
| 711 | 711 | # Can the user set this field? |
| 712 | | - if( $bitfield & Revision::DELETED_RESTRICTED && !$wgUser->isAllowed('hiderevision') ) { |
| 713 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 712 | + if( $bitfield & Revision::DELETED_RESTRICTED && !$wgUser->isAllowed('suppressrevision') ) { |
| | 713 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 714 | 714 | return false; |
| 715 | 715 | } |
| 716 | 716 | # If the save went through, go to success message. Otherwise |
| — | — | @@ -844,7 +844,7 @@ |
| 845 | 845 | // Where all revs allowed to be set? |
| 846 | 846 | if( !$userAllowedAll ) { |
| 847 | 847 | //FIXME: still might be confusing??? |
| 848 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 848 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 849 | 849 | return false; |
| 850 | 850 | } |
| 851 | 851 | |
| — | — | @@ -914,7 +914,7 @@ |
| 915 | 915 | } |
| 916 | 916 | // Where all revs allowed to be set? |
| 917 | 917 | if( !$userAllowedAll ) { |
| 918 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 918 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 919 | 919 | return false; |
| 920 | 920 | } |
| 921 | 921 | |
| — | — | @@ -1006,7 +1006,7 @@ |
| 1007 | 1007 | } |
| 1008 | 1008 | // Where all revs allowed to be set? |
| 1009 | 1009 | if( !$userAllowedAll ) { |
| 1010 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 1010 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 1011 | 1011 | return false; |
| 1012 | 1012 | } |
| 1013 | 1013 | |
| — | — | @@ -1062,7 +1062,7 @@ |
| 1063 | 1063 | } |
| 1064 | 1064 | // Where all revs allowed to be set? |
| 1065 | 1065 | if( !$userAllowedAll ) { |
| 1066 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 1066 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 1067 | 1067 | return false; |
| 1068 | 1068 | } |
| 1069 | 1069 | |
| — | — | @@ -1121,7 +1121,7 @@ |
| 1122 | 1122 | } |
| 1123 | 1123 | // Were all revs allowed to be set? |
| 1124 | 1124 | if( !$userAllowedAll ) { |
| 1125 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 1125 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 1126 | 1126 | return false; |
| 1127 | 1127 | } |
| 1128 | 1128 | |
| Index: trunk/phase3/includes/filerepo/OldLocalFile.php |
| — | — | @@ -166,7 +166,7 @@ |
| 167 | 167 | if( isset($this->deleted) && ($this->deleted & $field) == $field ) { |
| 168 | 168 | global $wgUser; |
| 169 | 169 | $permission = ( $this->deleted & File::DELETED_RESTRICTED ) == File::DELETED_RESTRICTED |
| 170 | | - ? 'hiderevision' |
| | 170 | + ? 'suppressrevision' |
| 171 | 171 | : 'deleterevision'; |
| 172 | 172 | wfDebug( "Checking for $permission due to $field match on $this->mDeleted\n" ); |
| 173 | 173 | return $wgUser->isAllowed( $permission ); |
| Index: trunk/phase3/includes/filerepo/ArchivedFile.php |
| — | — | @@ -333,7 +333,7 @@ |
| 334 | 334 | if( ($this->deleted & $field) == $field ) { |
| 335 | 335 | global $wgUser; |
| 336 | 336 | $permission = ( $this->deleted & File::DELETED_RESTRICTED ) == File::DELETED_RESTRICTED |
| 337 | | - ? 'hiderevision' |
| | 337 | + ? 'suppressrevision' |
| 338 | 338 | : 'deleterevision'; |
| 339 | 339 | wfDebug( "Checking for $permission due to $field match on $this->deleted\n" ); |
| 340 | 340 | return $wgUser->isAllowed( $permission ); |
| Index: trunk/phase3/includes/LogEventsList.php |
| — | — | @@ -338,7 +338,7 @@ |
| 339 | 339 | if( ( $row->log_deleted & $field ) == $field ) { |
| 340 | 340 | global $wgUser; |
| 341 | 341 | $permission = ( $row->log_deleted & LogPage::DELETED_RESTRICTED ) == LogPage::DELETED_RESTRICTED |
| 342 | | - ? 'hiderevision' |
| | 342 | + ? 'suppressrevision' |
| 343 | 343 | : 'deleterevision'; |
| 344 | 344 | wfDebug( "Checking for $permission due to $field match on $row->log_deleted\n" ); |
| 345 | 345 | return $wgUser->isAllowed( $permission ); |
| Index: trunk/phase3/includes/Revision.php |
| — | — | @@ -890,7 +890,7 @@ |
| 891 | 891 | if( ( $this->mDeleted & $field ) == $field ) { |
| 892 | 892 | global $wgUser; |
| 893 | 893 | $permission = ( $this->mDeleted & self::DELETED_RESTRICTED ) == self::DELETED_RESTRICTED |
| 894 | | - ? 'hiderevision' |
| | 894 | + ? 'suppressrevision' |
| 895 | 895 | : 'deleterevision'; |
| 896 | 896 | wfDebug( "Checking for $permission due to $field match on $this->mDeleted\n" ); |
| 897 | 897 | return $wgUser->isAllowed( $permission ); |
| Index: trunk/phase3/includes/ChangesList.php |
| — | — | @@ -288,7 +288,7 @@ |
| 289 | 289 | if( ( $rc->mAttribs['rc_deleted'] & $field ) == $field ) { |
| 290 | 290 | global $wgUser; |
| 291 | 291 | $permission = ( $rc->mAttribs['rc_deleted'] & Revision::DELETED_RESTRICTED ) == Revision::DELETED_RESTRICTED |
| 292 | | - ? 'hiderevision' |
| | 292 | + ? 'suppressrevision' |
| 293 | 293 | : 'deleterevision'; |
| 294 | 294 | wfDebug( "Checking for $permission due to $field match on $rc->mAttribs['rc_deleted']\n" ); |
| 295 | 295 | return $wgUser->isAllowed( $permission ); |
| Index: trunk/phase3/includes/SpecialUndelete.php |
| — | — | @@ -588,7 +588,7 @@ |
| 589 | 589 | $this->mPreview = $request->getCheck( 'preview' ) && $posted; |
| 590 | 590 | $this->mDiff = $request->getCheck( 'diff' ); |
| 591 | 591 | $this->mComment = $request->getText( 'wpComment' ); |
| 592 | | - $this->mUnsuppress = $request->getVal( 'wpUnsuppress' ) && $wgUser->isAllowed( 'hiderevision' ); |
| | 592 | + $this->mUnsuppress = $request->getVal( 'wpUnsuppress' ) && $wgUser->isAllowed( 'suppressrevision' ); |
| 593 | 593 | |
| 594 | 594 | if( $par != "" ) { |
| 595 | 595 | $this->mTarget = $par; |
| — | — | @@ -653,7 +653,7 @@ |
| 654 | 654 | $file = new ArchivedFile( $this->mTargetObj, '', $this->mFile ); |
| 655 | 655 | // Check if user is allowed to see this file |
| 656 | 656 | if( !$file->userCan( File::DELETED_FILE ) ) { |
| 657 | | - $wgOut->permissionRequired( 'hiderevision' ); |
| | 657 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 658 | 658 | return false; |
| 659 | 659 | } else { |
| 660 | 660 | return $this->showFile( $this->mFile ); |
| — | — | @@ -967,13 +967,13 @@ |
| 968 | 968 | if( $this->mAllowed && ( $haveRevisions || $haveFiles ) ) { |
| 969 | 969 | # Format the user-visible controls (comment field, submission button) |
| 970 | 970 | # in a nice little table |
| 971 | | - if( $wgUser->isAllowed( 'hiderevision' ) ) { |
| | 971 | + if( $wgUser->isAllowed( 'suppressrevision' ) ) { |
| 972 | 972 | $unsuppressBox = |
| 973 | 973 | "<tr> |
| 974 | 974 | <td> </td> |
| 975 | 975 | <td class='mw-input'>" . |
| 976 | 976 | Xml::checkLabel( wfMsg('revdelete-unsuppress'), 'wpUnsuppress', |
| 977 | | - 'mw-undelete-unsupress', $this->mUnsuppress ). |
| | 977 | + 'mw-undelete-unsuppress', $this->mUnsuppress ). |
| 978 | 978 | "</td> |
| 979 | 979 | </tr>"; |
| 980 | 980 | } else { |
| Index: trunk/phase3/includes/FileDeleteForm.php |
| — | — | @@ -45,8 +45,7 @@ |
| 46 | 46 | $this->oldimage = $wgRequest->getText( 'oldimage', false ); |
| 47 | 47 | $token = $wgRequest->getText( 'wpEditToken' ); |
| 48 | 48 | # Flag to hide all contents of the archived revisions |
| 49 | | - $suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed('deleterevision') |
| 50 | | - && $wgUser->isAllowed('hiderevision'); |
| | 49 | + $suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed('suppressrevision'); |
| 51 | 50 | |
| 52 | 51 | if( $this->oldimage && !self::isValidOldSpec($this->oldimage) ) { |
| 53 | 52 | $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars( $this->oldimage ) ); |
| — | — | @@ -127,7 +126,7 @@ |
| 128 | 127 | global $wgOut, $wgUser, $wgRequest, $wgContLang; |
| 129 | 128 | $align = $wgContLang->isRtl() ? 'left' : 'right'; |
| 130 | 129 | |
| 131 | | - if( $wgUser->isAllowed( 'deleterevision' ) && $wgUser->isAllowed( 'hiderevision' ) ) { |
| | 130 | + if( $wgUser->isAllowed( 'suppressrevision' ) ) { |
| 132 | 131 | $suppress = "<tr id=\"wpDeleteSuppressRow\" name=\"wpDeleteSuppressRow\"><td></td><td>"; |
| 133 | 132 | $suppress .= Xml::checkLabel( wfMsg( 'revdelete-suppress' ), 'wpSuppress', 'wpSuppress', false, array( 'tabindex' => '2' ) ); |
| 134 | 133 | $suppress .= "</td></tr>"; |