Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php |
— | — | @@ -3,6 +3,8 @@ |
4 | 4 | // Special:Code/MediaWiki/40696 |
5 | 5 | class CodeRevisionView extends CodeView { |
6 | 6 | |
| 7 | + protected $showButtonsFormatReference = false; |
| 8 | + |
7 | 9 | /** |
8 | 10 | * @param string|CodeRepository $repo |
9 | 11 | * @param string|CodeRevision $rev |
— | — | @@ -483,6 +485,7 @@ |
484 | 486 | } |
485 | 487 | |
486 | 488 | protected function formatReferences( $showButtons ) { |
| 489 | + $this->showButtonsFormatReference = $showButtons; |
487 | 490 | $refs = implode( "\n", |
488 | 491 | array_map( array( $this, 'formatReferenceInline' ), $this->mRev->getReferences() ) |
489 | 492 | ); |
— | — | @@ -584,8 +587,14 @@ |
585 | 588 | $revLink = $this->skin->link( $title, $this->mRev->getIdString( $rev ) ); |
586 | 589 | $summary = $this->messageFragment( $row->cr_message ); |
587 | 590 | $author = $this->authorLink( $row->cr_author ); |
588 | | - $checkbox = Html::input( 'wpReferences[]', $rev, 'checkbox' ); |
589 | | - return "<tr class='$css'><td>$checkbox</td><td>$revLink</td><td>$summary</td><td>$author</td><td>$date</td></tr>"; |
| 591 | + |
| 592 | + $ret = "<tr class='$css'>"; |
| 593 | + if ( $this->showButtonsFormatReference ) { |
| 594 | + $checkbox = Html::input( 'wpReferences[]', $rev, 'checkbox' ); |
| 595 | + $ret .= "<td>$checkbox</td>"; |
| 596 | + } |
| 597 | + $ret .= "<td>$revLink</td><td>$summary</td><td>$author</td><td>$date</td></tr>"; |
| 598 | + return $ret; |
590 | 599 | } |
591 | 600 | |
592 | 601 | protected function commentLink( $commentId ) { |