r79407 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79406‎ | r79407 | r79408 >
Date:02:05, 1 January 2011
Author:reedy
Status:ok
Tags:
Comment:
Due to the way things are fragmented, and ignored if dupe on insert.. Might aswell move code to common
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -25,10 +25,8 @@
2626 if ( $rev->mPaths ) {
2727 if ( count( $rev->mPaths ) == 1 ) {
2828 $common = $rev->mPaths[0]['path'];
29 - $rev->mPaths = CodeRevision::getPathFragments( $rev->mPaths );
3029 } else {
3130 $first = array_shift( $rev->mPaths );
32 -
3331 $common = explode( '/', $first['path'] );
3432
3533 foreach ( $rev->mPaths as $path ) {
@@ -51,10 +49,10 @@
5250 }
5351 $common = implode( '/', $common );
5452
55 - $rev->mPaths = CodeRevision::getPathFragments( $rev->mPaths );
56 -
5753 array_unshift( $rev->mPaths, $first );
5854 }
 55+
 56+ $rev->mPaths = CodeRevision::getPathFragments( $rev->mPaths );
5957 }
6058 $rev->mCommonPath = $common;
6159

Status & tagging log