r40996 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40995‎ | r40996 | r40997 >
Date:17:07, 18 September 2008
Author:brion
Status:old
Tags:
Comment:
Cleanup r40950 in CodeReview:
* Separate diff link message from inline diff section header; lowercase the link for consistency
* Don't display a non-diff "(diff)" when there's no diff to show, that's silly :)
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.i18n.php (modified) (history)
  • /trunk/extensions/CodeReview/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.i18n.php
@@ -33,6 +33,7 @@
3434 'code-rev-comment-submit' => 'Submit comment',
3535 'code-rev-comment-preview' => 'Preview',
3636 'code-rev-diff' => 'Diff',
 37+ 'code-rev-diff-link' => 'diff',
3738
3839 'codereview-reply-link' => 'reply',
3940
Index: trunk/extensions/CodeReview/CodeRevisionView.php
@@ -106,20 +106,22 @@
107107 $desc = wfMsgHtml( 'code-rev-modified-'.strtolower( $action ) );
108108 $encPath = htmlspecialchars( $path );
109109 $viewvc = $this->mRepo->getViewVcBase();
110 - $diff = wfMsgHtml('code-rev-diff');
 110+ $diff = '';
111111 if( $viewvc ) {
112112 $rev = $this->mRev->getId();
113113 $prev = $rev - 1;
114114 $safePath = wfUrlEncode( $path );
115115 $link = $this->mSkin->makeExternalLink( "$viewvc$safePath?view=markup&pathrev=$rev", $encPath );
116116 if( $action !== 'A' ) {
117 - $diff = $this->mSkin->makeExternalLink( "$viewvc$safePath?&pathrev=$rev&r1=$prev&r2=$rev",
118 - wfMsgHtml('code-rev-diff') );
 117+ $diff = ' (' .
 118+ $this->mSkin->makeExternalLink( "$viewvc$safePath?&pathrev=$rev&r1=$prev&r2=$rev",
 119+ wfMsgHtml('code-rev-diff-link') ) .
 120+ ')';
119121 }
120122 } else {
121123 $link = $encPath;
122124 }
123 - return "<li>$link ($desc) ($diff)</li>\n";
 125+ return "<li>$link ($desc)$diff</li>\n";
124126 }
125127
126128 function formatTags() {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r40950Add handy diff linksaaron09:13, 17 September 2008

Status & tagging log