r69934 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69933‎ | r69934 | r69935 >
Date:08:20, 26 July 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Switch CodeRepository->getAuthorList() to return ordered by commit name, rather than last commited

Update description to match

Per:
<TimStarling> it should just be alphabetical
<TimStarling> it'd be a lot easier to find people
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.i18n.php (modified) (history)
  • /trunk/extensions/CodeReview/backend/CodeRepository.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.i18n.php
@@ -31,7 +31,7 @@
3232 'code-authors' => 'authors',
3333 'code-status' => 'states',
3434 'code-tags' => 'tags',
35 - 'code-authors-text' => 'Below is a list of repo authors in order of recent commits. Local wiki accounts are shown in parentheses.',
 35+ 'code-authors-text' => 'Below is a list of repo authors in order of commit name. Local wiki accounts are shown in parentheses.',
3636 'code-author-haslink' => 'This author is linked to the wiki user $1',
3737 'code-author-orphan' => 'This author has no link with a wiki account',
3838 'code-author-dolink' => 'Link this author to a wiki user:',
Index: trunk/extensions/CodeReview/backend/CodeRepository.php
@@ -113,11 +113,11 @@
114114 $dbr = wfGetDB( DB_SLAVE );
115115 $res = $dbr->select(
116116 'code_rev',
117 - array( 'cr_author', 'MAX(cr_timestamp) AS time' ),
 117+ array( 'cr_author' ),
118118 array( 'cr_repo_id' => $this->getId() ),
119119 __METHOD__,
120120 array( 'GROUP BY' => 'cr_author',
121 - 'ORDER BY' => 'time DESC', 'LIMIT' => 500 )
 121+ 'ORDER BY' => 'cr_author', 'LIMIT' => 500 )
122122 );
123123 $authors = array();
124124 while ( $row = $dbr->fetchObject( $res ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r74079Followup r69934, show list of last commit dates also....reedy17:39, 1 October 2010

Comments

#Comment by MaxSem (talk | contribs)   08:50, 26 July 2010

Frankly, both sort orders have their own use cases. We've gotta allow different sort orders eventually.

#Comment by Reedy (talk | contribs)   09:13, 26 July 2010

Other way is JS sorttables or similar....?

#Comment by 😂 (talk | contribs)   14:18, 1 October 2010

Could be possible. Add a "(last commit - TIME)" and some JS to swap ordering.

Status & tagging log