r72624 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72623‎ | r72624 | r72625 >
Date:01:21, 9 September 2010
Author:reedy
Status:ok
Tags:
Comment:
Followup r72623, need to actually change how we're doing the comparison of "number of rows", so switching to using returned value, use select and numRows
Modified paths:
  • /trunk/extensions/ArticleAssessmentPilot/api/ApiQueryArticleAssessment.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleAssessmentPilot/api/ApiQueryArticleAssessment.php
@@ -100,7 +100,7 @@
101101
102102 global $wgArticleAssessmentStaleCount;
103103
104 - $res = $dbr->selectField(
 104+ $res = $dbr->select(
105105 'revision',
106106 'rev_id',
107107 array(
@@ -111,7 +111,7 @@
112112 array ( 'LIMIT', $wgArticleAssessmentStaleCount + 1 )
113113 );
114114
115 - if ( $res && (int)$res > $wgArticleAssessmentStaleCount ) {
 115+ if ( $res && $dbr->numRows( $res ) > $wgArticleAssessmentStaleCount ) {
116116 //it's stale!
117117 $ratings[$params['pageid']]['stale'] = intval( $res );
118118 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72623Followup r72532, actually follow what the CR notes suggested, use limit fetch...reedy01:15, 9 September 2010

Status & tagging log