r72538 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72537‎ | r72538 | r72539 >
Date:14:30, 7 September 2010
Author:reedy
Status:ok
Tags:
Comment:
Only use read rev_id value for searching stale base point
Modified paths:
  • /trunk/extensions/ArticleAssessmentPilot/api/ApiQueryArticleAssessment.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleAssessmentPilot/api/ApiQueryArticleAssessment.php
@@ -96,8 +96,6 @@
9797
9898 //Only can actually be "stale" if the user has rated the article before
9999 if ( $params['userrating'] && $userRatedArticle ) {
100 - $revid = isset( $params['revid'] ) ? $params['revid'] : $ratings[$pageId]['revid'];
101 -
102100 $dbr = wfGetDb( DB_SLAVE );
103101
104102 global $wgArticleAssessmentStaleCount;
@@ -107,7 +105,7 @@
108106 'COUNT(*) AS norevs',
109107 array(
110108 'rev_page' => $params['pageid'],
111 - 'rev_id > ' . $revid
 109+ 'rev_id > ' . $ratings[$pageId]['revid']
112110 ),
113111 __METHOD__,
114112 array ( 'LIMIT', $wgArticleAssessmentStaleCount + 1 )

Status & tagging log