r62515 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62514‎ | r62515 | r62516 >
Date:12:30, 15 February 2010
Author:happydog
Status:ok
Tags:
Comment:
CodeReview: Fixed error in CodeRevisionView::formatPathLine(). $safePath was being used to output the path when ViewVC is disabled, but is only being created inside the code path where it is enabled. Have moved this outside the if statement so it is available to both code paths.

I also made the path bold so that it stands out more. It's a lot harder to read this section if the paths are not differentiated from the normal text in some way. Originally, I only added this for when ViewVC was disabled, as the link colouring when it is enabled is enough to make it stand out. Then I realised that deleted paths are not made into links (for obvious reasons) and so added a bold there too, but then it looked weird to have the links in normal font and the non-links in bold, so I added it for all situations.
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php
@@ -206,10 +206,10 @@
207207 $path = preg_replace( '/ \([^\)]+\)$/', '', $path );
208208 $viewvc = $this->mRepo->getViewVcBase();
209209 $diff = '';
 210+ $safePath = wfUrlEncode( $path );
210211 if ( $viewvc ) {
211212 $rev = $this->mRev->getId();
212213 $prev = $rev - 1;
213 - $safePath = wfUrlEncode( $path );
214214 if ( $action !== 'D' ) {
215215 $link = $this->mSkin->makeExternalLink(
216216 "$viewvc$safePath?view=markup&pathrev=$rev",
@@ -227,7 +227,7 @@
228228 } else {
229229 $link = $safePath;
230230 }
231 - return "<li>$link ($desc)$diff</li>\n";
 231+ return "<li><b>$link</b> ($desc)$diff</li>\n";
232232 }
233233
234234 protected function tagForm() {

Status & tagging log