Index: trunk/extensions/CodeReview/ui/CodeCommentsListView.php |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | } |
51 | 51 | |
52 | 52 | function getQueryInfo() { |
53 | | - return array( |
| 53 | + $query = array( |
54 | 54 | 'tables' => array( 'code_comment', 'code_rev' ), |
55 | 55 | 'fields' => array_keys( $this->getFieldNames() ), |
56 | 56 | 'conds' => array( 'cc_repo_id' => $this->mRepo->getId() ), |
— | — | @@ -57,10 +57,16 @@ |
58 | 58 | 'code_rev' => array( 'LEFT JOIN', 'cc_repo_id = cr_repo_id AND cc_rev_id = cr_id' ) |
59 | 59 | ) |
60 | 60 | ); |
| 61 | + |
| 62 | + if( $this->mView->mAuthor ) { |
| 63 | + $query['conds']['cc_user_text'] = $this->mView->mAuthor; |
| 64 | + } |
| 65 | + |
| 66 | + return $query; |
61 | 67 | } |
62 | 68 | |
63 | 69 | function getFieldNames() { |
64 | | - $query = array( |
| 70 | + return array( |
65 | 71 | 'cc_timestamp' => wfMsg( 'code-field-timestamp' ), |
66 | 72 | 'cc_user_text' => wfMsg( 'code-field-user' ), |
67 | 73 | 'cc_rev_id' => wfMsg( 'code-field-id' ), |
— | — | @@ -68,12 +74,6 @@ |
69 | 75 | 'cr_message' => wfMsg( 'code-field-message' ), |
70 | 76 | 'cc_text' => wfMsg( 'code-field-text' ), |
71 | 77 | ); |
72 | | - |
73 | | - if( $this->mView->mAuthor ) { |
74 | | - $query['conds']['cc_user_text'] = $this->mView->mAuthor; |
75 | | - } |
76 | | - |
77 | | - return $query; |
78 | 78 | } |
79 | 79 | |
80 | 80 | function formatValue( $name, $value ) { |