Index: trunk/phase3/includes/QueryPage.php |
— | — | @@ -382,8 +382,10 @@ |
383 | 383 | |
384 | 384 | /** |
385 | 385 | * Parameters and order changed in 1.18 |
| 386 | + * |
| 387 | + * Somewhat deprecated, you probably want to be using execute() |
386 | 388 | */ |
387 | | - function doQuery( $limit, $offset = false ) { |
| 389 | + function doQuery( $offset = false, $limit ) { |
388 | 390 | if ( $this->isCached() && $this->isCacheable() ) { |
389 | 391 | return $this->fetchFromCache( $limit, $offset ); |
390 | 392 | } else { |
— | — | @@ -552,8 +554,9 @@ |
553 | 555 | |
554 | 556 | if ( $num > 0 ) { |
555 | 557 | $html = array(); |
556 | | - if ( !$this->listoutput ) |
| 558 | + if ( !$this->listoutput ) { |
557 | 559 | $html[] = $this->openList( $offset ); |
| 560 | + } |
558 | 561 | |
559 | 562 | # $res might contain the whole 1,000 rows, so we read up to |
560 | 563 | # $num [should update this to use a Pager] |
— | — | @@ -583,8 +586,9 @@ |
584 | 587 | } |
585 | 588 | } |
586 | 589 | |
587 | | - if ( !$this->listoutput ) |
| 590 | + if ( !$this->listoutput ) { |
588 | 591 | $html[] = $this->closeList(); |
| 592 | + } |
589 | 593 | |
590 | 594 | $html = $this->listoutput |
591 | 595 | ? $wgContLang->listToText( $html ) |
— | — | @@ -631,7 +635,6 @@ |
632 | 636 | $this->feedUrl() ); |
633 | 637 | $feed->outHeader(); |
634 | 638 | |
635 | | - $dbr = wfGetDB( DB_SLAVE ); |
636 | 639 | $res = $this->reallyDoQuery( $limit, 0 ); |
637 | 640 | foreach ( $res as $obj ) { |
638 | 641 | $item = $this->feedResult( $obj ); |