Index: trunk/phase3/includes/User.php |
— | — | @@ -142,8 +142,7 @@ |
143 | 143 | 'createtalk', |
144 | 144 | 'delete', |
145 | 145 | 'deletedhistory', |
146 | | - 'deletedcontent', |
147 | | - 'deletedrevision', |
| 146 | + 'deletedtext', |
148 | 147 | 'deleterevision', |
149 | 148 | 'edit', |
150 | 149 | 'editinterface', |
Index: trunk/phase3/includes/diff/DifferenceInterface.php |
— | — | @@ -318,7 +318,7 @@ |
319 | 319 | }
|
320 | 320 |
|
321 | 321 | $rdel = ''; $ldel = '';
|
322 | | - if( $wgUser->isAllowed( 'deletedrevision' ) ) {
|
| 322 | + if( $wgUser->isAllowed( 'deletedhistory' ) ) {
|
323 | 323 | // Don't show useless link to people who cannot hide revisions
|
324 | 324 | if( $this->mOldRev->getVisibility() || $wgUser->isAllowed( 'deleterevision' ) ) {
|
325 | 325 | if( !$this->mOldRev->userCan( Revision::DELETED_RESTRICTED ) ) {
|
Index: trunk/phase3/includes/Article.php |
— | — | @@ -3430,7 +3430,7 @@ |
3431 | 3431 | |
3432 | 3432 | $cdel=''; |
3433 | 3433 | // Don't show useless link to people who cannot hide revisions |
3434 | | - if( $wgUser->isAllowed('deleterevision') || ($revision->getVisibility() && $wgUser->isAllowed('deletedrevision')) ) { |
| 3434 | + if( $wgUser->isAllowed('deleterevision') || ($revision->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) { |
3435 | 3435 | if( !$revision->userCan( Revision::DELETED_RESTRICTED ) ) { |
3436 | 3436 | // If revision was hidden from sysops |
3437 | 3437 | $cdel = wfMsgHtml( 'rev-delundel' ); |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -821,7 +821,7 @@ |
822 | 822 | . $navLinks . "\n" |
823 | 823 | . Xml::openElement( 'table', array( 'class' => 'wikitable filehistory' ) ) . "\n" |
824 | 824 | . '<tr><td></td>' |
825 | | - . ( $this->current->isLocal() && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deletedrevision') ) ? '<td></td>' : '' ) |
| 825 | + . ( $this->current->isLocal() && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deletedhistory') ) ? '<td></td>' : '' ) |
826 | 826 | . '<th>' . wfMsgHtml( 'filehist-datetime' ) . '</th>' |
827 | 827 | . ( $this->showThumb ? '<th>' . wfMsgHtml( 'filehist-thumb' ) . '</th>' : '' ) |
828 | 828 | . '<th>' . wfMsgHtml( 'filehist-dimensions' ) . '</th>' |
— | — | @@ -847,7 +847,7 @@ |
848 | 848 | $row = $css = $selected = ''; |
849 | 849 | |
850 | 850 | // Deletion link |
851 | | - if( $local && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deletedrevision') ) ) { |
| 851 | + if( $local && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deletedhistory') ) ) { |
852 | 852 | $row .= '<td>'; |
853 | 853 | # Link to remove from history |
854 | 854 | if( $wgUser->isAllowed( 'delete' ) ) { |
— | — | @@ -861,7 +861,7 @@ |
862 | 862 | ); |
863 | 863 | } |
864 | 864 | # Link to hide content. Don't show useless link to people who cannot hide revisions. |
865 | | - if( $wgUser->isAllowed('deleterevision') || ($wgUser->isAllowed('deletedrevision') && $file->getVisibility()) ) { |
| 865 | + if( $wgUser->isAllowed('deleterevision') || ($wgUser->isAllowed('deletedhistory') && $file->getVisibility()) ) { |
866 | 866 | if( $wgUser->isAllowed('delete') ) { |
867 | 867 | $row .= '<br/>'; |
868 | 868 | } |
Index: trunk/phase3/includes/filerepo/OldLocalFile.php |
— | — | @@ -195,11 +195,11 @@ |
196 | 196 | * @return bool |
197 | 197 | */ |
198 | 198 | function userCan( $field ) { |
199 | | - if( isset($this->deleted) && ($this->deleted & $field) == $field ) { |
| 199 | + if( isset($this->deleted) && ($this->deleted & $field) ) { |
200 | 200 | global $wgUser; |
201 | | - $permission = ( $this->deleted & File::DELETED_RESTRICTED ) == File::DELETED_RESTRICTED |
| 201 | + $permission = ( $this->deleted & File::DELETED_RESTRICTED ) |
202 | 202 | ? 'suppressrevision' |
203 | | - : 'deletedrevision'; |
| 203 | + : ( $field & File::DELETED_FILE ) ? 'deletedtext' : 'deletedhistory'; |
204 | 204 | wfDebug( "Checking for $permission due to $field match on $this->mDeleted\n" ); |
205 | 205 | return $wgUser->isAllowed( $permission ); |
206 | 206 | } else { |
Index: trunk/phase3/includes/filerepo/ArchivedFile.php |
— | — | @@ -377,11 +377,11 @@ |
378 | 378 | */ |
379 | 379 | public function userCan( $field ) { |
380 | 380 | $this->load(); |
381 | | - if( ($this->deleted & $field) == $field ) { |
| 381 | + if( $this->deleted & $field ) { |
382 | 382 | global $wgUser; |
383 | | - $permission = ( $this->deleted & File::DELETED_RESTRICTED ) == File::DELETED_RESTRICTED |
| 383 | + $permission = ( $this->deleted & File::DELETED_RESTRICTED ) |
384 | 384 | ? 'suppressrevision' |
385 | | - : 'deletedrevision'; |
| 385 | + : ( $field & File::DELETED_FILE ) ? 'deletedtext' : 'deletedhistory'; |
386 | 386 | wfDebug( "Checking for $permission due to $field match on $this->deleted\n" ); |
387 | 387 | return $wgUser->isAllowed( $permission ); |
388 | 388 | } else { |
Index: trunk/phase3/includes/HistoryPage.php |
— | — | @@ -351,7 +351,7 @@ |
352 | 352 | $s .= Xml::hidden( 'title', $this->title->getPrefixedDbKey() ) . "\n"; |
353 | 353 | |
354 | 354 | $this->buttons = '<div>'; |
355 | | - if( $wgUser->isAllowed('deletedrevision') ) { |
| 355 | + if( $wgUser->isAllowed('deletedhistory') ) { |
356 | 356 | $this->buttons .= Xml::element( 'button', |
357 | 357 | array( |
358 | 358 | 'type' => 'submit', |
— | — | @@ -464,7 +464,7 @@ |
465 | 465 | |
466 | 466 | $s = "($curlink) ($lastlink) $diffButtons"; |
467 | 467 | |
468 | | - if( $wgUser->isAllowed( 'deletedrevision' ) ) { |
| 468 | + if( $wgUser->isAllowed( 'deletedhistory' ) ) { |
469 | 469 | // Don't show useless link to people who cannot hide revisions |
470 | 470 | if( !$rev->getVisibility() && !$wgUser->isAllowed( 'deleterevision' ) ) { |
471 | 471 | $del = Xml::check( 'deleterevisions', false, array('class' => 'mw-revdelundel-hidden') ); |
Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -284,7 +284,7 @@ |
285 | 285 | $paramArray = LogPage::extractParams( $row->log_params ); |
286 | 286 | $revert = $del = ''; |
287 | 287 | // Some user can hide log items and have review links |
288 | | - if( !($this->flags & self::NO_ACTION_LINK) && $wgUser->isAllowed( 'deletedrevision' ) ) { |
| 288 | + if( !($this->flags & self::NO_ACTION_LINK) && $wgUser->isAllowed( 'deletedhistory' ) ) { |
289 | 289 | // Don't show useless link to people who cannot hide revisions |
290 | 290 | if( $row->log_deleted || $wgUser->isAllowed( 'deleterevision' ) ) { |
291 | 291 | $del = $this->getShowHideLinks( $row ) . ' '; |
— | — | @@ -381,7 +381,7 @@ |
382 | 382 | array( 'known', 'noclasses' ) |
383 | 383 | ) . ')'; |
384 | 384 | // If an edit was hidden from a page give a review link to the history |
385 | | - } else if( self::typeAction($row,array('delete','suppress'),'revision','deletedrevision') ) { |
| 385 | + } else if( self::typeAction($row,array('delete','suppress'),'revision','deletedhistory') ) { |
386 | 386 | if( count($paramArray) >= 2 ) { |
387 | 387 | // Different revision types use different URL params... |
388 | 388 | $key = $paramArray[0]; |
— | — | @@ -434,7 +434,7 @@ |
435 | 435 | $revert = wfMsg( 'parentheses', $wgLang->pipeList( $revert ) ); |
436 | 436 | } |
437 | 437 | // Hidden log items, give review link |
438 | | - } else if( self::typeAction($row,array('delete','suppress'),'event','deletedrevision') ) { |
| 438 | + } else if( self::typeAction($row,array('delete','suppress'),'event','deletedhistory') ) { |
439 | 439 | if( count($paramArray) >= 1 ) { |
440 | 440 | $revdel = SpecialPage::getTitleFor( 'Revisiondelete' ); |
441 | 441 | // $paramArray[1] is a CSV of the IDs |
— | — | @@ -547,11 +547,11 @@ |
548 | 548 | * @return Boolean |
549 | 549 | */ |
550 | 550 | public static function userCan( $row, $field ) { |
551 | | - if( ( $row->log_deleted & $field ) == $field ) { |
| 551 | + if( $row->log_deleted & $field ) { |
552 | 552 | global $wgUser; |
553 | | - $permission = ( $row->log_deleted & LogPage::DELETED_RESTRICTED ) == LogPage::DELETED_RESTRICTED |
| 553 | + $permission = ( $row->log_deleted & LogPage::DELETED_RESTRICTED ) |
554 | 554 | ? 'suppressrevision' |
555 | | - : 'deletedrevision'; |
| 555 | + : 'deletedhistory'; |
556 | 556 | wfDebug( "Checking for $permission due to $field match on $row->log_deleted\n" ); |
557 | 557 | return $wgUser->isAllowed( $permission ); |
558 | 558 | } else { |
— | — | @@ -807,7 +807,7 @@ |
808 | 808 | global $wgUser; |
809 | 809 | $this->mConds['log_user'] = $userid; |
810 | 810 | // Paranoia: avoid brute force searches (bug 17342) |
811 | | - if( !$wgUser->isAllowed( 'deletedrevision' ) ) { |
| 811 | + if( !$wgUser->isAllowed( 'deletedhistory' ) ) { |
812 | 812 | $this->mConds[] = $this->mDb->bitAnd('log_deleted', LogPage::DELETED_USER) . ' = 0'; |
813 | 813 | } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) { |
814 | 814 | $this->mConds[] = $this->mDb->bitAnd('log_deleted', LogPage::SUPPRESSED_USER) . |
— | — | @@ -854,7 +854,7 @@ |
855 | 855 | $this->mConds['log_title'] = $title->getDBkey(); |
856 | 856 | } |
857 | 857 | // Paranoia: avoid brute force searches (bug 17342) |
858 | | - if( !$wgUser->isAllowed( 'deletedrevision' ) ) { |
| 858 | + if( !$wgUser->isAllowed( 'deletedhistory' ) ) { |
859 | 859 | $this->mConds[] = $this->mDb->bitAnd('log_deleted', LogPage::DELETED_ACTION) . ' = 0'; |
860 | 860 | } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) { |
861 | 861 | $this->mConds[] = $this->mDb->bitAnd('log_deleted', LogPage::SUPPRESSED_ACTION) . |
Index: trunk/phase3/includes/Revision.php |
— | — | @@ -977,11 +977,11 @@ |
978 | 978 | * @return bool |
979 | 979 | */ |
980 | 980 | public function userCan( $field ) { |
981 | | - if( ( $this->mDeleted & $field ) == $field ) { |
| 981 | + if( $this->mDeleted & $field ) { |
982 | 982 | global $wgUser; |
983 | | - $permission = ( $this->mDeleted & self::DELETED_RESTRICTED ) == self::DELETED_RESTRICTED |
| 983 | + $permission = ( $this->mDeleted & self::DELETED_RESTRICTED ) |
984 | 984 | ? 'suppressrevision' |
985 | | - : 'deletedrevision'; |
| 985 | + : ( $field & self::DELETED_TEXT ) ? 'deletedtext' : 'deletedhistory'; |
986 | 986 | wfDebug( "Checking for $permission due to $field match on $this->mDeleted\n" ); |
987 | 987 | return $wgUser->isAllowed( $permission ); |
988 | 988 | } else { |
Index: trunk/phase3/includes/ChangesList.php |
— | — | @@ -446,11 +446,11 @@ |
447 | 447 | * @return bool |
448 | 448 | */ |
449 | 449 | public static function userCan( $rc, $field ) { |
450 | | - if( ( $rc->mAttribs['rc_deleted'] & $field ) == $field ) { |
| 450 | + if( $rc->mAttribs['rc_deleted'] & $field ) { |
451 | 451 | global $wgUser; |
452 | | - $permission = ( $rc->mAttribs['rc_deleted'] & Revision::DELETED_RESTRICTED ) == Revision::DELETED_RESTRICTED |
| 452 | + $permission = ( $rc->mAttribs['rc_deleted'] & Revision::DELETED_RESTRICTED ) |
453 | 453 | ? 'suppressrevision' |
454 | | - : 'deletedrevision'; |
| 454 | + : ( $field & Revision::DELETED_TEXT ) ? 'deletedtext' : 'deletedhistory'; |
455 | 455 | wfDebug( "Checking for $permission due to $field match on {$rc->mAttribs['rc_deleted']}\n" ); |
456 | 456 | return $wgUser->isAllowed( $permission ); |
457 | 457 | } else { |
Index: trunk/phase3/includes/FileDeleteForm.php |
— | — | @@ -97,7 +97,7 @@ |
98 | 98 | if( $status->ok ) { |
99 | 99 | // Need to do a log item |
100 | 100 | $log = new LogPage( 'delete' ); |
101 | | - $logComment = wfMsgForContent( 'deletedrevision', $oldimage ); |
| 101 | + $logComment = wfMsgForContent( 'deletedhistory', $oldimage ); |
102 | 102 | if( trim( $reason ) != '' ) |
103 | 103 | $logComment .= ": {$reason}"; |
104 | 104 | $log->addEntry( 'delete', $title, $logComment ); |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -800,7 +800,7 @@ |
801 | 801 | } |
802 | 802 | } else { |
803 | 803 | //article doesn't exist or is deleted |
804 | | - if( $wgUser->isAllowed( 'deletedhistory' ) && $wgUser->isAllowed( 'deletedcontent' ) ) { |
| 804 | + if( $wgUser->isAllowed( 'deletedhistory' ) && $wgUser->isAllowed( 'deletedtext' ) ) { |
805 | 805 | if( $n = $this->mTitle->isDeleted() ) { |
806 | 806 | $undelTitle = SpecialPage::getTitleFor( 'Undelete' ); |
807 | 807 | $content_actions['undelete'] = array( |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1354,8 +1354,7 @@ |
1355 | 1355 | $wgGroupPermissions['sysop']['delete'] = true; |
1356 | 1356 | $wgGroupPermissions['sysop']['bigdelete'] = true; // can be separately configured for pages with > $wgDeleteRevisionsLimit revs |
1357 | 1357 | $wgGroupPermissions['sysop']['deletedhistory'] = true; // can view deleted history entries, but not see or restore the text |
1358 | | -$wgGroupPermissions['sysop']['deletedcontent'] = true; // can view deleted revision text |
1359 | | -$wgGroupPermissions['sysop']['deletedrevision'] = true; // can view hidden revision items (user/comment/text) |
| 1358 | +$wgGroupPermissions['sysop']['deletedtext'] = true; // can view deleted revision text |
1360 | 1359 | $wgGroupPermissions['sysop']['undelete'] = true; |
1361 | 1360 | $wgGroupPermissions['sysop']['editinterface'] = true; |
1362 | 1361 | $wgGroupPermissions['sysop']['editusercss'] = true; |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -576,10 +576,10 @@ |
577 | 577 | if( $par != "" ) { |
578 | 578 | $this->mTarget = $par; |
579 | 579 | } |
580 | | - if ( $wgUser->isAllowed( 'deletedcontent' ) && $wgUser->isAllowed( 'undelete' ) && !$wgUser->isBlocked() ) { |
| 580 | + if ( $wgUser->isAllowed( 'deletedtext' ) && $wgUser->isAllowed( 'undelete' ) && !$wgUser->isBlocked() ) { |
581 | 581 | $this->mAllowed = true; // user can restore |
582 | 582 | $this->mCanView = true; // user can view content |
583 | | - } elseif ( $wgUser->isAllowed( 'deletedcontent' ) ) { |
| 583 | + } elseif ( $wgUser->isAllowed( 'deletedtext' ) ) { |
584 | 584 | $this->mAllowed = false; // user cannot restore |
585 | 585 | $this->mCanView = true; // user can view content |
586 | 586 | } else { // user can only view the list of revisions |
— | — | @@ -639,9 +639,17 @@ |
640 | 640 | } |
641 | 641 | if( $this->mFile !== null ) { |
642 | 642 | $file = new ArchivedFile( $this->mTargetObj, '', $this->mFile ); |
| 643 | + $file->load(); |
643 | 644 | // Check if user is allowed to see this file |
644 | | - if( !$file->userCan( File::DELETED_FILE ) ) { |
645 | | - $wgOut->permissionRequired( 'suppressrevision' ); |
| 645 | + if ( !$file->exists() ) { |
| 646 | + $wgOut->addWikiMsg( 'filedelete-nofile', $this->mFile ); |
| 647 | + return; |
| 648 | + } else if( !$file->userCan( File::DELETED_FILE ) ) { |
| 649 | + if( $file->isDeleted( File::DELETED_RESTRICTED ) ) { |
| 650 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 651 | + } else { |
| 652 | + $wgOut->permissionRequired( 'deletedtext' ); |
| 653 | + } |
646 | 654 | return false; |
647 | 655 | } elseif ( !$wgUser->matchEditToken( $this->mToken, $this->mFile ) ) { |
648 | 656 | $this->showFileConfirmationForm( $this->mFile ); |
— | — | @@ -779,7 +787,7 @@ |
780 | 788 | |
781 | 789 | $revdlink = ''; |
782 | 790 | // Diffs already have revision delete links |
783 | | - if( !$this->mDiff && $wgUser->isAllowed( 'deletedrevision' ) ) { |
| 791 | + if( !$this->mDiff && $wgUser->isAllowed( 'deletedhistory' ) ) { |
784 | 792 | // Don't show useless link to people who cannot hide revisions |
785 | 793 | if( !$rev->getVisibility() && !$wgUser->isAllowed( 'deleterevision' ) ) { |
786 | 794 | $revdlink = ''; |
— | — | @@ -893,7 +901,7 @@ |
894 | 902 | $targetQuery = array( 'oldid' => $rev->getId() ); |
895 | 903 | } |
896 | 904 | // Add show/hide link if available. Don't show useless link to people who cannot hide revisions. |
897 | | - if( $wgUser->isAllowed('deleterevision') || ($rev->getVisibility() && $wgUser->isAllowed('deletedrevision')) ) { |
| 905 | + if( $wgUser->isAllowed('deleterevision') || ($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) { |
898 | 906 | // If revision was hidden from sysops |
899 | 907 | if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { |
900 | 908 | $del = ' ' . Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), |
— | — | @@ -1194,7 +1202,7 @@ |
1195 | 1203 | // Edit summary |
1196 | 1204 | $comment = $sk->revComment( $rev ); |
1197 | 1205 | // Show/hide link. // Don't show useless link to people who cannot hide revisions. |
1198 | | - if( $wgUser->isAllowed('deleterevision') || ($rev->getVisibility() && $wgUser->isAllowed('deletedrevision')) ) { |
| 1206 | + if( $wgUser->isAllowed('deleterevision') || ($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) { |
1199 | 1207 | if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { |
1200 | 1208 | // If revision was hidden from sysops |
1201 | 1209 | $revdlink = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), |
— | — | @@ -1241,7 +1249,7 @@ |
1242 | 1250 | $comment = $this->getFileComment( $file, $sk ); |
1243 | 1251 | $revdlink = ''; |
1244 | 1252 | // Add show/hide link if available. Don't show useless link to people who cannot hide revisions. |
1245 | | - if( $wgUser->isAllowed('deleterevision') || ($file->getVisibility() && $wgUser->isAllowed('deletedrevision')) ) { |
| 1253 | + if( $wgUser->isAllowed('deleterevision') || ($file->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) { |
1246 | 1254 | if( !$file->userCan(File::DELETED_RESTRICTED ) ) { |
1247 | 1255 | // If revision was hidden from sysops |
1248 | 1256 | $revdlink = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), '('.wfMsgHtml('rev-delundel').')' ); |
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php |
— | — | @@ -90,13 +90,13 @@ |
91 | 91 | ); |
92 | 92 | |
93 | 93 | public function __construct() { |
94 | | - parent::__construct( 'Revisiondelete', 'deletedrevision' ); |
| 94 | + parent::__construct( 'Revisiondelete', 'deletedhistory' ); |
95 | 95 | } |
96 | 96 | |
97 | 97 | public function execute( $par ) { |
98 | 98 | global $wgOut, $wgUser, $wgRequest; |
99 | | - if( !$wgUser->isAllowed( 'deletedrevision' ) ) { |
100 | | - $wgOut->permissionRequired( 'deletedrevision' ); |
| 99 | + if( !$wgUser->isAllowed( 'deletedhistory' ) ) { |
| 100 | + $wgOut->permissionRequired( 'deletedhistory' ); |
101 | 101 | return; |
102 | 102 | } else if( wfReadOnly() ) { |
103 | 103 | $wgOut->readOnlyPage(); |
— | — | @@ -261,7 +261,11 @@ |
262 | 262 | return; |
263 | 263 | } |
264 | 264 | if( !$oimage->userCan(File::DELETED_FILE) ) { |
265 | | - $wgOut->permissionRequired( 'suppressrevision' ); |
| 265 | + if( $oimage->isDeleted( File::DELETED_RESTRICTED ) ) { |
| 266 | + $wgOut->permissionRequired( 'suppressrevision' ); |
| 267 | + } else { |
| 268 | + $wgOut->permissionRequired( 'deletedtext' ); |
| 269 | + } |
266 | 270 | return; |
267 | 271 | } |
268 | 272 | if ( !$wgUser->matchEditToken( $this->token, $archiveName ) ) { |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -461,7 +461,7 @@ |
462 | 462 | |
463 | 463 | $conds = array_merge( $userCond, $this->getNamespaceCond() ); |
464 | 464 | // Paranoia: avoid brute force searches (bug 17342) |
465 | | - if( !$wgUser->isAllowed( 'deletedrevision' ) ) { |
| 465 | + if( !$wgUser->isAllowed( 'deletedhistory' ) ) { |
466 | 466 | $conds[] = $this->mDb->bitAnd('rev_deleted',Revision::DELETED_USER) . ' = 0'; |
467 | 467 | } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) { |
468 | 468 | $conds[] = $this->mDb->bitAnd('rev_deleted',Revision::SUPPRESSED_USER) . |
— | — | @@ -633,7 +633,7 @@ |
634 | 634 | } |
635 | 635 | |
636 | 636 | // Don't show useless link to people who cannot hide revisions |
637 | | - if( $wgUser->isAllowed('deleterevision') || ($rev->getVisibility() && $wgUser->isAllowed('deletedrevision')) ) { |
| 637 | + if( $wgUser->isAllowed('deleterevision') || ($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) { |
638 | 638 | // If revision was hidden from sysops |
639 | 639 | if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { |
640 | 640 | $del = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), |
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | list( $index, $userCond ) = $this->getUserCond(); |
33 | 33 | $conds = array_merge( $userCond, $this->getNamespaceCond() ); |
34 | 34 | // Paranoia: avoid brute force searches (bug 17792) |
35 | | - if( !$wgUser->isAllowed( 'deletedrevision' ) ) { |
| 35 | + if( !$wgUser->isAllowed( 'deletedhistory' ) ) { |
36 | 36 | $conds[] = $this->mDb->bitAnd('ar_deleted',Revision::DELETED_USER) . ' = 0'; |
37 | 37 | } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) { |
38 | 38 | $conds[] = $this->mDb->bitAnd('ar_deleted',Revision::SUPPRESSED_USER) . |
— | — | @@ -146,7 +146,7 @@ |
147 | 147 | $this->messages['undeleteviewlink'] |
148 | 148 | ); |
149 | 149 | |
150 | | - if( $wgUser->isAllowed('deletedcontent') ) { |
| 150 | + if( $wgUser->isAllowed('deletedtext') ) { |
151 | 151 | $last = $sk->linkKnown( |
152 | 152 | $undelete, |
153 | 153 | $this->messages['diff'], |
— | — | @@ -191,7 +191,7 @@ |
192 | 192 | } |
193 | 193 | |
194 | 194 | // Don't show useless link to people who cannot hide revisions |
195 | | - if( $wgUser->isAllowed('deleterevision') || ($rev->getVisibility() && $wgUser->isAllowed('deletedrevision')) ) { |
| 195 | + if( $wgUser->isAllowed('deleterevision') || ($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) { |
196 | 196 | // If revision was hidden from sysops |
197 | 197 | if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { |
198 | 198 | $del = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), |