Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -100,7 +100,13 @@ |
101 | 101 | |
102 | 102 | $currentPath .= $fragment; |
103 | 103 | |
104 | | - $allPaths[] = array( 'path' => $currentPath, 'action' => $path['action'] ) ; |
| 104 | + if ( $currentPath == $path['path'] ) { |
| 105 | + $action = $path['action']; |
| 106 | + } else { |
| 107 | + $action = 'N'; |
| 108 | + } |
| 109 | + |
| 110 | + $allPaths[] = array( 'path' => $currentPath, 'action' => $action ); |
105 | 111 | } |
106 | 112 | } |
107 | 113 | |
Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php |
— | — | @@ -99,6 +99,10 @@ |
100 | 100 | $paths = ''; |
101 | 101 | $modifiedPaths = $this->mRev->getModifiedPaths(); |
102 | 102 | foreach ( $modifiedPaths as $row ) { |
| 103 | + // Don't output NOOP paths |
| 104 | + if ( strtolower( $row->cp_action ) == 'n' ){ |
| 105 | + continue; |
| 106 | + } |
103 | 107 | $paths .= $this->formatPathLine( $row->cp_path, $row->cp_action ); |
104 | 108 | } |
105 | 109 | if ( $paths ) { |
— | — | @@ -248,7 +252,7 @@ |
249 | 253 | global $wgUser; |
250 | 254 | return $wgUser->isAllowed( 'codereview-signoff' ) && !$wgUser->isBlocked(); |
251 | 255 | } |
252 | | - |
| 256 | + |
253 | 257 | /** |
254 | 258 | * @return bool Whether the current user can add and remove associations between revisions |
255 | 259 | */ |
— | — | @@ -258,8 +262,14 @@ |
259 | 263 | } |
260 | 264 | |
261 | 265 | protected function formatPathLine( $path, $action ) { |
| 266 | + $action = strtolower( $action ); |
| 267 | + |
| 268 | + // If NOOP passed, return '' |
| 269 | + if ( $action == 'n' ) { |
| 270 | + return ''; |
| 271 | + } |
262 | 272 | // Uses messages 'code-rev-modified-a', 'code-rev-modified-r', 'code-rev-modified-d', 'code-rev-modified-m' |
263 | | - $desc = wfMsgHtml( 'code-rev-modified-' . strtolower( $action ) ); |
| 273 | + $desc = wfMsgHtml( 'code-rev-modified-' . $action ); |
264 | 274 | // Find any ' (from x)' from rename comment in the path. |
265 | 275 | $matches = array(); |
266 | 276 | preg_match( '/ \([^\)]+\)$/', $path, $matches ); |