Index: trunk/phase3/includes/HistoryPage.php |
— | — | @@ -133,9 +133,14 @@ |
134 | 134 | * We use "isBigDeletion" to determine if the history is too big to go through. |
135 | 135 | * Additionally, only users with 'deleterevision' right can filter for deleted edits. |
136 | 136 | */ |
137 | | - if ( $this->title->userCan( 'deleterevision' ) && ( !$this->article->isBigDeletion() || $this->title->userCan( 'bigdelete' ) ) ) { |
138 | | - $conds = ( $wgRequest->getBool( 'deleted' ) ) ? array("rev_deleted != '0'") : array(); |
139 | | - $checkDeleted = Xml::checkLabel( wfMsg( 'history-show-deleted' ), 'deleted', '', $wgRequest->getBool( 'deleted' ) ) . "\n"; |
| 137 | + if ( $this->title->userCan( 'deleterevision' ) |
| 138 | + && ( !$this->article->isBigDeletion() || $this->title->userCan( 'bigdelete' ) ) ) |
| 139 | + { |
| 140 | + $conds = ( $wgRequest->getBool( 'deleted' ) ) |
| 141 | + ? array("rev_deleted != '0'") |
| 142 | + : array(); |
| 143 | + $checkDeleted = Xml::checkLabel( wfMsg( 'history-show-deleted' ), |
| 144 | + 'deleted', 'mw-show-deleted-only', $wgRequest->getBool( 'deleted' ) ) . "\n"; |
140 | 145 | } |
141 | 146 | else { # Don't filter and don't add the checkbox for filtering |
142 | 147 | $conds = array(); |
— | — | @@ -324,7 +329,9 @@ |
325 | 330 | $queryInfo = array( |
326 | 331 | 'tables' => array('revision'), |
327 | 332 | 'fields' => Revision::selectFields(), |
328 | | - 'conds' => array_merge( array('rev_page' => $this->historyPage->title->getArticleID() ), $this->conds ), |
| 333 | + 'conds' => array_merge( |
| 334 | + array( 'rev_page' => $this->historyPage->title->getArticleID() ), |
| 335 | + $this->conds ), |
329 | 336 | 'options' => array( 'USE INDEX' => array('revision' => 'page_timestamp') ), |
330 | 337 | 'join_conds' => array( 'tag_summary' => array( 'LEFT JOIN', 'ts_rev_id=rev_id' ) ), |
331 | 338 | ); |
— | — | @@ -487,7 +494,8 @@ |
488 | 495 | $del = Xml::check( 'deleterevisions', false, array( 'disabled' => 'disabled' ) ); |
489 | 496 | // Otherwise, enable the checkbox... |
490 | 497 | } else { |
491 | | - $del = Xml::check( 'showhiderevisions', false, array( 'name' => 'ids['.$rev->getId().']' ) ); |
| 498 | + $del = Xml::check( 'showhiderevisions', false, |
| 499 | + array( 'name' => 'ids['.$rev->getId().']' ) ); |
492 | 500 | } |
493 | 501 | // User can only view deleted revisions... |
494 | 502 | } else if( $rev->getVisibility() && $wgUser->isAllowed( 'deletedhistory' ) ) { |
— | — | @@ -505,7 +513,8 @@ |
506 | 514 | if( $del ) $s .= " $del "; |
507 | 515 | |
508 | 516 | $s .= " $link"; |
509 | | - $s .= " <span class='history-user'>" . $this->getSkin()->revUserTools( $rev, true ) . "</span>"; |
| 517 | + $s .= " <span class='history-user'>" . |
| 518 | + $this->getSkin()->revUserTools( $rev, true ) . "</span>"; |
510 | 519 | |
511 | 520 | if( $rev->isMinor() ) { |
512 | 521 | $s .= ' ' . ChangesList::flag( 'minor' ); |
— | — | @@ -648,7 +657,9 @@ |
649 | 658 | ), |
650 | 659 | array( 'known', 'noclasses' ) |
651 | 660 | ); |
652 | | - } elseif( !$prevRev->userCan(Revision::DELETED_TEXT) || !$nextRev->userCan(Revision::DELETED_TEXT) ) { |
| 661 | + } elseif( !$prevRev->userCan(Revision::DELETED_TEXT) |
| 662 | + || !$nextRev->userCan(Revision::DELETED_TEXT) ) |
| 663 | + { |
653 | 664 | return $last; |
654 | 665 | } else { |
655 | 666 | return $this->getSkin()->link( |