Index: trunk/extensions/CodeReview/ui/CodeStatusChangeAuthorListView.php |
— | — | @@ -0,0 +1,10 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +class CodeStatusChangeAuthorListView extends CodeStatusChangeListView { |
| 5 | + |
| 6 | + function __construct( $repo, $author ) { |
| 7 | + parent::__construct( $repo ); |
| 8 | + |
| 9 | + $this->mAuthor = $author; |
| 10 | + } |
| 11 | +} |
Property changes on: trunk/extensions/CodeReview/ui/CodeStatusChangeAuthorListView.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 12 | + native |
Index: trunk/extensions/CodeReview/ui/SpecialCode.php |
— | — | @@ -112,12 +112,15 @@ |
113 | 113 | break; |
114 | 114 | } |
115 | 115 | case 4: |
116 | | - if ( $params[1] == 'author' && $params[3] == 'link' ) { |
| 116 | + if ( $params[1] === 'author' && $params[3] === 'link' ) { |
117 | 117 | $view = new CodeRevisionAuthorLink( $params[0], $params[2] ); |
118 | 118 | break; |
119 | 119 | } elseif ( $params[1] === 'comments' ) { |
120 | 120 | $view = new CodeCommentsAuthorListView( $params[0], $params[3] ); |
121 | 121 | break; |
| 122 | + } elseif ( $params[1] === 'status' ) { |
| 123 | + $view = new CodeStatusChangeAuthorListView( $params[0], $params[3] ); |
| 124 | + break; |
122 | 125 | } |
123 | 126 | default: |
124 | 127 | if ( $params[2] == 'reply' ) { |
Index: trunk/extensions/CodeReview/ui/CodeStatusChangeListView.php |
— | — | @@ -4,9 +4,14 @@ |
5 | 5 | class CodeStatusChangeListView extends CodeView { |
6 | 6 | public $mRepo; |
7 | 7 | |
8 | | - function __construct( $repoName ) { |
| 8 | + function __construct( $repo ) { |
9 | 9 | parent::__construct(); |
10 | | - $this->mRepo = CodeRepository::newFromName( $repoName ); |
| 10 | + $this->mRepo = ( $repo instanceof CodeRepository ) |
| 11 | + ? $repo |
| 12 | + : CodeRepository::newFromName( $repo ); |
| 13 | + |
| 14 | + global $wgRequest; |
| 15 | + $this->mAuthor = $wgRequest->getText( 'author' ); |
11 | 16 | } |
12 | 17 | |
13 | 18 | function execute() { |
— | — | @@ -41,7 +46,7 @@ |
42 | 47 | function getDefaultSort() { return 'cpc_timestamp'; } |
43 | 48 | |
44 | 49 | function getQueryInfo() { |
45 | | - return array( |
| 50 | + $query = array( |
46 | 51 | 'tables' => array( 'code_prop_changes', 'code_rev' ), |
47 | 52 | 'fields' => array_keys( $this->getFieldNames() ), |
48 | 53 | 'conds' => array( 'cpc_repo_id' => $this->mRepo->getId(), 'cpc_attrib' => 'status' ), |
— | — | @@ -49,6 +54,12 @@ |
50 | 55 | 'code_rev' => array( 'LEFT JOIN', 'cpc_repo_id = cr_repo_id AND cpc_rev_id = cr_id' ) |
51 | 56 | ) |
52 | 57 | ); |
| 58 | + |
| 59 | + if ( $this->mView->mAuthor ) { |
| 60 | + $query['conds']['cpc_user_text'] = $this->mView->mAuthor; |
| 61 | + } |
| 62 | + |
| 63 | + return $query; |
53 | 64 | } |
54 | 65 | |
55 | 66 | function getFieldNames() { |