r82641 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82640‎ | r82641 | r82642 >
Date:23:22, 22 February 2011
Author:reedy
Status:resolved
Tags:
Comment:
Followup r78786, per complaints on r82636, revert parameter ordering

Mark doQuery as deprecated/not the suggested run point

Add a couple of braces
Modified paths:
  • /trunk/phase3/includes/QueryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/QueryPage.php
@@ -382,8 +382,10 @@
383383
384384 /**
385385 * Parameters and order changed in 1.18
 386+ *
 387+ * Somewhat deprecated, you probably want to be using execute()
386388 */
387 - function doQuery( $limit, $offset = false ) {
 389+ function doQuery( $offset = false, $limit ) {
388390 if ( $this->isCached() && $this->isCacheable() ) {
389391 return $this->fetchFromCache( $limit, $offset );
390392 } else {
@@ -552,8 +554,9 @@
553555
554556 if ( $num > 0 ) {
555557 $html = array();
556 - if ( !$this->listoutput )
 558+ if ( !$this->listoutput ) {
557559 $html[] = $this->openList( $offset );
 560+ }
558561
559562 # $res might contain the whole 1,000 rows, so we read up to
560563 # $num [should update this to use a Pager]
@@ -583,8 +586,9 @@
584587 }
585588 }
586589
587 - if ( !$this->listoutput )
 590+ if ( !$this->listoutput ) {
588591 $html[] = $this->closeList();
 592+ }
589593
590594 $html = $this->listoutput
591595 ? $wgContLang->listToText( $html )
@@ -631,7 +635,6 @@
632636 $this->feedUrl() );
633637 $feed->outHeader();
634638
635 - $dbr = wfGetDB( DB_SLAVE );
636639 $res = $this->reallyDoQuery( $limit, 0 );
637640 foreach ( $res as $obj ) {
638641 $item = $this->feedResult( $obj );

Follow-up revisions

RevisionCommit summaryAuthorDate
r82642Partial revert r82636 after fixing swapped parameters in r82641reedy23:26, 22 February 2011
r82643Remove now redundant comment after r82641reedy23:26, 22 February 2011
r82644Followup r82641, set default for 2nd param...reedy23:40, 22 February 2011
r82671fix page again after r82642 and r82641jeroendedauw14:35, 23 February 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78786Merge querypage-work2 branch from trunk. The most relevant changes are:...catrope14:16, 22 December 2010
r82636fix bug 27440jeroendedauw22:30, 22 February 2011

Status & tagging log