r40952 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40951‎ | r40952 | r40953 >
Date:09:19, 17 September 2008
Author:aaron
Status:old
Tags:
Comment:
avoid some invalid diff links
Modified paths:
  • /trunk/extensions/CodeReview/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeRevisionView.php
@@ -106,16 +106,18 @@
107107 $desc = wfMsgHtml( 'code-rev-modified-'.strtolower( $action ) );
108108 $encPath = htmlspecialchars( $path );
109109 $viewvc = $this->mRepo->getViewVcBase();
 110+ $diff = wfMsgHtml('code-rev-diff');
110111 if( $viewvc ) {
111112 $rev = $this->mRev->getId();
112113 $prev = $rev - 1;
113114 $safePath = wfUrlEncode( $path );
114115 $link = $this->mSkin->makeExternalLink( "$viewvc$safePath?view=markup&pathrev=$rev", $encPath );
115 - $diff = $this->mSkin->makeExternalLink( "$viewvc$safePath?&pathrev=$rev&r1=$prev&r2=$rev",
116 - wfMsgHtml('code-rev-diff') );
 116+ if( $action !== 'A' ) {
 117+ $diff = $this->mSkin->makeExternalLink( "$viewvc$safePath?&pathrev=$rev&r1=$prev&r2=$rev",
 118+ wfMsgHtml('code-rev-diff') );
 119+ }
117120 } else {
118121 $link = $encPath;
119 - $diff = wfMsgHtml('code-rev-diff');
120122 }
121123 return "<li>$link ($desc) ($diff)</li>\n";
122124 }

Status & tagging log