Index: trunk/phase3/includes/diff/DifferenceInterface.php |
— | — | @@ -312,40 +312,38 @@ |
313 | 313 | $newminor = ChangesList::flag( 'minor' ); |
314 | 314 | } |
315 | 315 | |
316 | | - $rdel = ''; $ldel = ''; |
| 316 | + $rdel = $ldel = ''; |
317 | 317 | # Handle RevisionDelete links... |
318 | | - if( $wgUser->isAllowed( 'deletedhistory' ) ) { |
319 | | - $canHide = $wgUser->isAllowed( 'deleterevision' ); |
320 | | - // Don't show useless link to people who cannot hide revisions |
321 | | - if( $canHide || $this->mOldRev->getVisibility() ) { |
322 | | - if( !$this->mOldRev->userCan( Revision::DELETED_RESTRICTED ) ) { |
323 | | - $ldel = $sk->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops |
324 | | - } else { |
325 | | - $query = array( |
326 | | - 'type' => 'revision', |
327 | | - 'target' => $this->mOldRev->mTitle->getPrefixedDbkey(), |
328 | | - 'ids' => $this->mOldRev->getId() |
329 | | - ); |
330 | | - $ldel = $sk->revDeleteLink( $query, |
331 | | - $this->mOldRev->isDeleted( Revision::DELETED_RESTRICTED ), $canHide ); |
332 | | - } |
333 | | - $ldel = " $ldel "; |
| 318 | + $canHide = $wgUser->isAllowed( 'deleterevision' ); |
| 319 | + // Don't show useless link to people who cannot hide revisions |
| 320 | + if( $canHide || ($this->mOldRev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) { |
| 321 | + if( !$this->mOldRev->userCan( Revision::DELETED_RESTRICTED ) ) { |
| 322 | + $ldel = $sk->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops |
| 323 | + } else { |
| 324 | + $query = array( |
| 325 | + 'type' => 'revision', |
| 326 | + 'target' => $this->mOldRev->mTitle->getPrefixedDbkey(), |
| 327 | + 'ids' => $this->mOldRev->getId() |
| 328 | + ); |
| 329 | + $ldel = $sk->revDeleteLink( $query, |
| 330 | + $this->mOldRev->isDeleted( Revision::DELETED_RESTRICTED ), $canHide ); |
334 | 331 | } |
335 | | - // Don't show useless link to people who cannot hide revisions |
336 | | - if( $this->mNewRev->getVisibility() || $wgUser->isAllowed( 'deleterevision' ) ) { |
337 | | - if( !$this->mNewRev->userCan( Revision::DELETED_RESTRICTED ) ) { |
338 | | - $rdel = $sk->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops |
339 | | - } else { |
340 | | - $query = array( |
341 | | - 'type' => 'revision', |
342 | | - 'target' => $this->mNewRev->mTitle->getPrefixedDbkey(), |
343 | | - 'ids' => $this->mNewRev->getId() |
344 | | - ); |
345 | | - $rdel = $sk->revDeleteLink( $query, |
346 | | - $this->mNewRev->isDeleted( Revision::DELETED_RESTRICTED ), $canHide ); |
347 | | - } |
348 | | - $rdel = " $rdel "; |
| 332 | + $ldel = " $ldel "; |
| 333 | + } |
| 334 | + // Don't show useless link to people who cannot hide revisions |
| 335 | + if( $canHide || ($this->mNewRev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) { |
| 336 | + if( !$this->mNewRev->userCan( Revision::DELETED_RESTRICTED ) ) { |
| 337 | + $rdel = $sk->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops |
| 338 | + } else { |
| 339 | + $query = array( |
| 340 | + 'type' => 'revision', |
| 341 | + 'target' => $this->mNewRev->mTitle->getPrefixedDbkey(), |
| 342 | + 'ids' => $this->mNewRev->getId() |
| 343 | + ); |
| 344 | + $rdel = $sk->revDeleteLink( $query, |
| 345 | + $this->mNewRev->isDeleted( Revision::DELETED_RESTRICTED ), $canHide ); |
349 | 346 | } |
| 347 | + $rdel = " $rdel "; |
350 | 348 | } |
351 | 349 | |
352 | 350 | $oldHeader = '<div id="mw-diff-otitle1"><strong>'.$this->mOldtitle.'</strong></div>' . |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -3456,11 +3456,10 @@ |
3457 | 3457 | |
3458 | 3458 | $cdel = ''; |
3459 | 3459 | // User can delete revisions or view deleted revisions... |
3460 | | - $canHide = $wgUser->isAllowed('deleterevision'); |
| 3460 | + $canHide = $wgUser->isAllowed( 'deleterevision' ); |
3461 | 3461 | if( $canHide || ($revision->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) { |
3462 | | - // Is this hidden from Sysops? |
3463 | 3462 | if( !$revision->userCan( Revision::DELETED_RESTRICTED ) ) { |
3464 | | - $cdel = $sk->revDeleteLinkDisabled( $canHide ); |
| 3463 | + $cdel = $sk->revDeleteLinkDisabled( $canHide ); // rev was hidden from Sysops |
3465 | 3464 | } else { |
3466 | 3465 | $query = array( |
3467 | 3466 | 'type' => 'revision', |