r75939 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75938‎ | r75939 | r75940 >
Date:17:18, 3 November 2010
Author:demon
Status:ok (Comments)
Tags:
Comment:
Make author a query param, now urls like Special:Code/repo/status/new?author=foo will work \o/
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeRevisionListView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php
@@ -11,7 +11,7 @@
1212 if ( strlen( $this->mPath ) && $this->mPath[0] !== '/' ) {
1313 $this->mPath = "/{$this->mPath}"; // make sure this is a valid path
1414 }
15 - $this->mAuthor = null;
 15+ $this->mAuthor = $wgRequest->getText( 'author' );
1616 $this->mAppliedFilter = null;
1717 }
1818
@@ -233,7 +233,7 @@
234234 function getQueryInfo() {
235235 // Path-based query...
236236 if ( $this->getDefaultSort() === 'cp_rev_id' ) {
237 - return array(
 237+ $query = array(
238238 'tables' => array( 'code_paths', 'code_rev', 'code_comment' ),
239239 'fields' => $this->getSelectFields(),
240240 'conds' => array(
@@ -250,7 +250,7 @@
251251 );
252252 // No path; entire repo...
253253 } else {
254 - return array(
 254+ $query = array(
255255 'tables' => array( 'code_rev', 'code_comment' ),
256256 'fields' => $this->getSelectFields(),
257257 'conds' => array( 'cr_repo_id' => $this->mRepo->getId() ),
@@ -260,6 +260,10 @@
261261 )
262262 );
263263 }
 264+ if( $this->mView->mAuthor ) {
 265+ $query['conds']['cr_author'] = $this->mView->mAuthor;
 266+ }
 267+ return $query;
264268 }
265269
266270 function getSelectFields() {

Follow-up revisions

RevisionCommit summaryAuthorDate
r777921.16wmf4: MFT r75939catrope10:53, 5 December 2010
r77824Wikilink to users fixmes on wall of shame after r75939reedy19:49, 5 December 2010

Comments

#Comment by Catrope (talk | contribs)   10:51, 5 December 2010
  • shudder*

Fortunately, vvv has said he intends to clean up this param mess.

Status & tagging log