r45700 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45699‎ | r45700 | r45701 >
Date:14:17, 13 January 2009
Author:aaron
Status:ok
Tags:
Comment:
(bug 16929) Fix css name for comment column
Modified paths:
  • /trunk/extensions/CodeReview/CodeRevisionListView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeRevisionListView.php
@@ -82,7 +82,7 @@
8383 if( $this->getDefaultSort() === 'cp_rev_id' ) {
8484 return array(
8585 'tables' => array( 'code_paths', 'code_rev', 'code_comment' ),
86 - 'fields' => array_keys( $this->getFieldNames() ),
 86+ 'fields' => $this->getSelectFields(),
8787 'conds' => array(
8888 'cp_repo_id' => $this->mRepo->getId(),
8989 'cp_path LIKE '.$this->mDb->addQuotes($this->mDb->escapeLike( $this->getSVNPath() ).'%'),
@@ -99,7 +99,7 @@
100100 } else {
101101 return array(
102102 'tables' => array( 'code_rev', 'code_comment' ),
103 - 'fields' => array_keys( $this->getFieldNames() ),
 103+ 'fields' => $this->getSelectFields(),
104104 'conds' => array( 'cr_repo_id' => $this->mRepo->getId() ),
105105 'options' => array( 'GROUP BY' => 'cr_id' ),
106106 'join_conds' => array(
@@ -109,12 +109,17 @@
110110 }
111111 return false;
112112 }
 113+
 114+ function getSelectFields() {
 115+ return array( $this->getDefaultSort(), 'cr_status', 'COUNT( DISTINCT cc_id ) AS comments',
 116+ 'cr_path', 'cr_message', 'cr_author', 'cr_timestamp' );
 117+ }
113118
114119 function getFieldNames() {
115120 return array(
116121 $this->getDefaultSort() => wfMsg( 'code-field-id' ),
117122 'cr_status' => wfMsg( 'code-field-status' ),
118 - 'COUNT( DISTINCT cc_id)' => wfMsg( 'code-field-comments' ),
 123+ 'comments' => wfMsg( 'code-field-comments' ),
119124 'cr_path' => wfMsg( 'code-field-path' ),
120125 'cr_message' => wfMsg( 'code-field-message' ),
121126 'cr_author' => wfMsg( 'code-field-author' ),
@@ -142,7 +147,7 @@
143148 case 'cr_timestamp':
144149 global $wgLang;
145150 return $wgLang->timeanddate( $value, true );
146 - case 'COUNT( DISTINCT cc_id)':
 151+ case 'comments':
147152 return intval( $value );
148153 case 'cr_path':
149154 return Xml::element('div', array( 'title' => (string)$value ),

Status & tagging log