r84439 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84438‎ | r84439 | r84440 >
Date:05:19, 21 March 2011
Author:maxsem
Status:resolved (Comments)
Tags:
Comment:
Fixed SQL error when crrevs is provided
Modified paths:
  • /trunk/extensions/CodeReview/api/ApiQueryCodeRevisions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/api/ApiQueryCodeRevisions.php
@@ -60,7 +60,7 @@
6161
6262 $query = $pager->getQueryInfo();
6363
64 - $query['conds'][] = array( 'cr_id IN' => $params['revs'] );
 64+ $query['conds'][] = 'cr_id IN (' . $db->makeList( $params['revs'] ) . ')';
6565
6666 $revisions = $db->select( $query['tables'], $query['fields'], $query['conds'],
6767 __METHOD__, $query['options'], $query['join_conds'] );

Follow-up revisions

RevisionCommit summaryAuthorDate
r84442Simplification for r84439maxsem11:00, 21 March 2011
r845451.17wmf1: MFT r84439, r84442, fixes DB error in the coderevisions API modulecatrope19:29, 22 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77686Followup r77664, no need to build the list myselfreedy22:40, 3 December 2010

Comments

#Comment by Nikerabbit (talk | contribs)   07:53, 21 March 2011

What's wrong with?

$query['conds']['cr_id'] = $params['revs'];
#Comment by MaxSem (talk | contribs)   11:01, 21 March 2011

Thanks, fixed.

Status & tagging log