r43088 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43087‎ | r43088 | r43089 >
Date:18:26, 2 November 2008
Author:aaron
Status:old
Tags:
Comment:
(bug 16219) Fix broken rename paths
Modified paths:
  • /trunk/extensions/CodeReview/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeRevisionView.php
@@ -147,6 +147,11 @@
148148
149149 function formatPathLine( $path, $action ) {
150150 $desc = wfMsgHtml( 'code-rev-modified-'.strtolower( $action ) );
 151+ // Find any ' (from x)' from rename comment in the path.
 152+ preg_match( '/ \([^\)]+\)$/', $path, $matches );
 153+ $from = isset($matches[0]) ? $matches[0] : '';
 154+ // Remove ' (from x)' from rename comment in the path.
 155+ $path = preg_replace( '/ \([^\)]+\)$/', '', $path );
151156 $viewvc = $this->mRepo->getViewVcBase();
152157 $diff = '';
153158 if( $viewvc ) {
@@ -156,7 +161,7 @@
157162 if( $action !== 'D' ) {
158163 $link = $this->mSkin->makeExternalLink(
159164 "$viewvc$safePath?view=markup&pathrev=$rev",
160 - $path );
 165+ $path . $from );
161166 } else {
162167 $link = $safePath;
163168 }

Status & tagging log