function getQueryInfo() {
return null;
}
-
+
/**
* For back-compat, subclasses may return a raw SQL query here, as a string.
* This is stronly deprecated; getQueryInfo() should be overridden instead.
if ( !$this->isCacheable() ) {
return 0;
}
-
+
$fname = get_class( $this ) . '::recache';
$dbw = wfGetDB( DB_MASTER );
$dbr = wfGetDB( DB_SLAVE, array( $this->getName(), __METHOD__, 'vslow' ) );
}
/**
- * Parameters and order changed in 1.18
+ * Somewhat deprecated, you probably want to be using execute()
*/
- function doQuery( $limit, $offset = false ) {
+ function doQuery( $offset = false, $limit = false ) {
if ( $this->isCached() && $this->isCacheable() ) {
return $this->fetchFromCache( $limit, $offset );
} else {
}
if ( $this->sortDescending() ) {
$options['ORDER BY'] = 'qc_value DESC';
+ } else {
+ $options['ORDER BY'] = 'qc_value ASC';
}
$res = $dbr->select( 'querycache', array( 'qc_type',
'qc_namespace AS namespace',
if ( $num > 0 ) {
$html = array();
- if ( !$this->listoutput )
+ if ( !$this->listoutput ) {
$html[] = $this->openList( $offset );
+ }
# $res might contain the whole 1,000 rows, so we read up to
# $num [should update this to use a Pager]
}
}
- if ( !$this->listoutput )
+ if ( !$this->listoutput ) {
$html[] = $this->closeList();
+ }
$html = $this->listoutput
? $wgContLang->listToText( $html )
$this->feedUrl() );
$feed->outHeader();
- $dbr = wfGetDB( DB_SLAVE );
$res = $this->reallyDoQuery( $limit, 0 );
foreach ( $res as $obj ) {
$item = $this->feedResult( $obj );