Index: branches/wmf/1.16wmf4/extensions/CodeReview/ui/CodeRevisionListView.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | if ( strlen( $this->mPath ) && $this->mPath[0] !== '/' ) { |
13 | 13 | $this->mPath = "/{$this->mPath}"; // make sure this is a valid path |
14 | 14 | } |
15 | | - $this->mAuthor = null; |
| 15 | + $this->mAuthor = $wgRequest->getText( 'author' ); |
16 | 16 | $this->mAppliedFilter = null; |
17 | 17 | } |
18 | 18 | |
— | — | @@ -233,7 +233,7 @@ |
234 | 234 | function getQueryInfo() { |
235 | 235 | // Path-based query... |
236 | 236 | if ( $this->getDefaultSort() === 'cp_rev_id' ) { |
237 | | - return array( |
| 237 | + $query = array( |
238 | 238 | 'tables' => array( 'code_paths', 'code_rev', 'code_comment' ), |
239 | 239 | 'fields' => $this->getSelectFields(), |
240 | 240 | 'conds' => array( |
— | — | @@ -250,7 +250,7 @@ |
251 | 251 | ); |
252 | 252 | // No path; entire repo... |
253 | 253 | } else { |
254 | | - return array( |
| 254 | + $query = array( |
255 | 255 | 'tables' => array( 'code_rev', 'code_comment' ), |
256 | 256 | 'fields' => $this->getSelectFields(), |
257 | 257 | 'conds' => array( 'cr_repo_id' => $this->mRepo->getId() ), |
— | — | @@ -260,6 +260,10 @@ |
261 | 261 | ) |
262 | 262 | ); |
263 | 263 | } |
| 264 | + if( $this->mView->mAuthor ) { |
| 265 | + $query['conds']['cr_author'] = $this->mView->mAuthor; |
| 266 | + } |
| 267 | + return $query; |
264 | 268 | } |
265 | 269 | |
266 | 270 | function getSelectFields() { |