r75839 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75838‎ | r75839 | r75840 >
Date:23:02, 1 November 2010
Author:reedy
Status:deferred
Tags:
Comment:
Followup r75817, fixup api code a little bit
Modified paths:
  • /trunk/extensions/WikiSync/WikiSyncApi.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiSync/WikiSyncApi.php
@@ -136,7 +136,7 @@
137137
138138 # return list of similar revisions
139139 $count = 0;
140 - while ( $row = $db->fetchObject( $dbres ) ) {
 140+ foreach ( $dbres as $row ) {
141141 if ( ++$count > $limit ) {
142142 $this->setContinueEnumParameter( 'startid', intval( $row->rev_id ) );
143143 break;
@@ -150,7 +150,6 @@
151151 }
152152 # place result list items into attributes of <similarrev> xml tag
153153 $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'similarrev' );
154 - $db->freeResult( $dbres );
155154 }
156155
157156 private function extractRowInfo( $row ) {
@@ -226,7 +225,7 @@
227226 }
228227
229228 public function getVersion() {
230 - return __CLASS__;
 229+ return __CLASS__ . ': $Id$';
231230 }
232231 } /* end of ApiFindSimilarRev class */
233232
@@ -322,7 +321,7 @@
323322 } else {
324323 # revisions edit history mode
325324 $count = 0;
326 - while ( $row = $db->fetchObject( $dbres ) ) {
 325+ foreach ( $dbres as $row ) {
327326 if ( ++$count > $limit ) {
328327 $this->setContinueEnumParameter( 'startid', intval( $row->rev_id ) );
329328 break;
@@ -338,7 +337,6 @@
339338 $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'revision' );
340339 // $this->getResult()->setIndexedTagName( $resultData, 'page' );
341340 // $this->getResult()->addValue( null, $this->getModuleName(), $resultData );
342 - $db->freeResult( $dbres );
343341 }
344342 }
345343
@@ -436,7 +434,7 @@
437435 }
438436
439437 public function getVersion() {
440 - return __CLASS__;
 438+ return __CLASS__ . ': $Id$';
441439 }
442440 } /* end of ApiRevisionHistory class */
443441
@@ -599,7 +597,7 @@
600598 }
601599
602600 public function getVersion() {
603 - return __CLASS__;
 601+ return __CLASS__ . ': $Id$';
604602 }
605603
606604 } /* end of ApiGetFile class */
Property changes on: trunk/extensions/WikiSync/WikiSyncApi.php
___________________________________________________________________
Added: svn:keywords
607605 + Id

Follow-up revisions

RevisionCommit summaryAuthorDate
r75840Merging from r75664 through r75839 of trunkawjrichards23:06, 1 November 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75817Initial commit of WikiSync extensionquestpc19:01, 1 November 2010

Status & tagging log