r72175 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72174‎ | r72175 | r72176 >
Date:23:07, 1 September 2010
Author:reedy
Status:deferred
Tags:
Comment:
Minor code fixups.

Update param description, whitespace
Modified paths:
  • /trunk/extensions/ArticleAssessmentPilot/api/ApiListArticleAssessment.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleAssessmentPilot/api/ApiListArticleAssessment.php
@@ -27,7 +27,7 @@
2828 ) );
2929
3030 if ( isset( $params['pageid'] ) ) {
31 - $this->addWhereFld( 'aa_page_id', $params['pageid'] );
 31+ $this->addWhereFld( 'aap_page_id', $params['pageid'] );
3232 }
3333
3434 if ( $params['userrating'] ) {
@@ -57,10 +57,10 @@
5858 if ( isset( $params['revid'] ) ){
5959 $this->addWhereFld( 'aa_revision', $params['revid'] );
6060 }
 61+
 62+ $this->addOption( 'ORDER BY', 'aa_revision DESC' );
6163 }
6264
63 - $this->addOption( 'ORDER BY', 'aa_revision DESC' );
64 -
6565 $limit = $params['limit'];
6666 $this->addOption( 'LIMIT', $limit * 4 ); //4 "Ratings"
6767
@@ -119,7 +119,7 @@
120120
121121 if ( $res ) {
122122 $noOfRevs = $res->fetchRow()->norevs;
123 - if ( $noOfRevs > $wgArticleAssessmentStaleCount ){
 123+ if ( $noOfRevs > $wgArticleAssessmentStaleCount ) {
124124 //it's stale!
125125 $ratings[$params['pageid']]['stale'] = intval( $noOfRevs );
126126 }
@@ -162,7 +162,7 @@
163163 public function getParamDescription() {
164164 return array(
165165 'pageid' => 'Page ID to get assessments for',
166 - 'revid' => 'Specific revision to get (used in conjunction with userrating param, otherwise ignored. Needed for stale calculation)',
 166+ 'revid' => 'Specific revision to get (used in conjunction with userrating param, otherwise ignored)',
167167 'userrating' => 'Whether to get the current users ratings for the specific rev/article',
168168 'anontoken' => 'Token for anonymous users',
169169 'limit' => 'Amount of pages to get the ratings for',

Status & tagging log