Index: trunk/extensions/CodeReview/CodeReview.i18n.php |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | 'code-field-message' => 'Comment', |
20 | 20 | 'code-field-status' => 'Status', |
21 | 21 | 'code-field-timestamp' => 'Date', |
| 22 | + 'code-field-comments' => 'Notes', |
22 | 23 | 'code-rev-author' => 'Author:', |
23 | 24 | 'code-rev-message' => 'Comment:', |
24 | 25 | 'code-rev-repo' => 'Repository:', |
Index: trunk/extensions/CodeReview/CodeRevisionListView.php |
— | — | @@ -46,9 +46,13 @@ |
47 | 47 | |
48 | 48 | function getQueryInfo(){ |
49 | 49 | return array( |
50 | | - 'tables' => array( 'code_rev' ), |
| 50 | + 'tables' => array( 'code_rev', 'code_comment' ), |
51 | 51 | 'fields' => array_keys( $this->getFieldNames() ), |
52 | 52 | 'conds' => array( 'cr_repo_id' => $this->mRepo->getId() ), |
| 53 | + 'options' => array( 'GROUP BY' => 'cr_id' ), |
| 54 | + 'join_conds' => array( |
| 55 | + 'code_comment' => array( 'LEFT JOIN', 'cc_repo_id = cr_repo_id AND cc_rev_id = cr_id' ) |
| 56 | + ) |
53 | 57 | ); |
54 | 58 | } |
55 | 59 | |
— | — | @@ -59,6 +63,7 @@ |
60 | 64 | 'cr_message' => wfMsg( 'code-field-message' ), |
61 | 65 | 'cr_author' => wfMsg( 'code-field-author' ), |
62 | 66 | 'cr_timestamp' => wfMsg( 'code-field-timestamp' ), |
| 67 | + 'COUNT(cc_rev_id)' => wfMsg( 'code-field-comments' ), |
63 | 68 | ); |
64 | 69 | } |
65 | 70 | |
— | — | @@ -81,6 +86,8 @@ |
82 | 87 | case 'cr_timestamp': |
83 | 88 | global $wgLang; |
84 | 89 | return $wgLang->timeanddate( $value ); |
| 90 | + case 'COUNT(cc_rev_id)': |
| 91 | + return intval( $value ); |
85 | 92 | } |
86 | 93 | } |
87 | 94 | |
— | — | @@ -89,7 +96,7 @@ |
90 | 97 | return str_replace( |
91 | 98 | '<tr>', |
92 | 99 | Xml::openElement( 'tr', |
93 | | - array( 'class' => "mw-codereview-status-$row->cr_status" ) ), |
| 100 | + array( 'class' => "mw-codereview-status-{$row->cr_status}" ) ), |
94 | 101 | parent::formatRow( $row ) ); |
95 | 102 | } |
96 | 103 | |