r90748 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90747‎ | r90748 | r90749 >
Date:01:46, 25 June 2011
Author:aaron
Status:ok
Tags:
Comment:
* Fixed formatPathLine() to account for strtolower() on $action, broken since r85671
* Also made formatPathLine() link to the last rev for deleted files instead of giving a disabled link
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php
@@ -288,14 +288,20 @@
289289 if ( $viewvc ) {
290290 $rev = $this->mRev->getId();
291291 $prev = $rev - 1;
292 - if ( $action !== 'D' ) {
 292+ if ( $action === 'd' ) {
 293+ if ( $rev > 1 ) {
 294+ $link = $this->skin->makeExternalLink( // last rev
 295+ "{$viewvc}{$safePath}?view=markup&pathrev=".($rev-1),
 296+ $path . $from );
 297+ } else {
 298+ $link = $safePath; // imported to SVN or something
 299+ }
 300+ } else {
293301 $link = $this->skin->makeExternalLink(
294 - "$viewvc$safePath?view=markup&pathrev=$rev",
 302+ "{$viewvc}{$safePath}?view=markup&pathrev=$rev",
295303 $path . $from );
296 - } else {
297 - $link = $safePath;
298304 }
299 - if ( $action !== 'A' && $action !== 'D' ) {
 305+ if ( $action !== 'a' && $action !== 'd' ) {
300306 $diff = ' (' .
301307 $this->skin->makeExternalLink(
302308 "$viewvc$safePath?&pathrev=$rev&r1=$prev&r2=$rev",

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85671* (bug 28122) Path fragmenting results in all paths having the same modified ...reedy15:30, 8 April 2011

Status & tagging log