r77270 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77269‎ | r77270 | r77271 >
Date:01:27, 25 November 2010
Author:aaron
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/FlaggedRevs (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/FlaggedRevs/api/ApiReview.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/FlaggedRevs/language (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/FlaggedRevs/maintenance/updateStats.inc (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs/maintenance/updateStats.inc
@@ -34,7 +34,7 @@
3535 array( 'GROUP BY' => 'page_namespace' ),
3636 array( 'flaggedpages' => array( 'LEFT JOIN', 'fp_page_id = page_id' ) )
3737 );
38 - foreach( $ret as $row ) {
 38+ while ( $row = $dbr->fetchObject( $ret ) ) {
3939 $ns_total[$row->page_namespace] = (int)$row->total;
4040 $ns_reviewed[$row->page_namespace] = (int)$row->reviewed;
4141 $ns_synced[$row->page_namespace] = (int)$row->reviewed - (int)$row->pending;
@@ -234,7 +234,7 @@
235235 if ( $dbr->numRows($res) ) {
236236 $times = array();
237237 # Get the sum of elapsed times
238 - foreach( $res as $row ) {
 238+ while ( $row = $dbr->fetchObject($res) ) {
239239 # Reviewed: just subtract the times (flagged - edit made)
240240 if ( $row->nft != null ) {
241241 $time = wfTimestamp(TS_UNIX,$row->nft) - wfTimestamp(TS_UNIX,$row->rt);
Property changes on: branches/wmf/1.16wmf4/extensions/FlaggedRevs/language
___________________________________________________________________
Modified: svn:mergeinfo
242242 Merged /trunk/extensions/FlaggedRevs/language:r77258,77260,77269
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs/api/ApiReview.php
@@ -111,7 +111,7 @@
112112 $this->getResult()->addValue(
113113 null, $this->getModuleName(), array( 'result' => 'Success' ) );
114114 # De-approve failure
115 - } elseif ( !$form->isApproval() ) {
 115+ } elseif ( $form->getAction() !== 'approve' ) {
116116 $this->dieUsage( "Cannot find a flagged revision with the specified ID.", 'notarget' );
117117 # Approval failures
118118 } else {
Property changes on: branches/wmf/1.16wmf4/extensions/FlaggedRevs/FlaggedArticleView.php
___________________________________________________________________
Modified: svn:mergeinfo
119119 Merged /trunk/extensions/FlaggedRevs/FlaggedArticleView.php:r77258,77260,77269
Property changes on: branches/wmf/1.16wmf4/extensions/FlaggedRevs
___________________________________________________________________
Modified: svn:mergeinfo
120120 Merged /trunk/extensions/FlaggedRevs:r77258,77260,77269

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77258Switch "!$form->isApproval()" to "$form->getAction() === 'approve'"reedy22:32, 24 November 2010
r77260Followup r77258, inverse logic (was a ! in the original)reedy22:33, 24 November 2010
r77269Reverted garbage from r75443aaron01:16, 25 November 2010

Status & tagging log