Basically api was thinking qplimit was the offset, and qpoffset was the limit. Also remove an extra ! when checking for the cached timestamp which was stopping the display of cachedtimestamp property in the api output.
I'm going to tag this 1.18 since this module was introduced in 1.18, and I assume we'd want to fix the limit/offset parameter before the wrong behaviour gets released and people depend on it, etc.
}
public function getCachedTimestamp() {
- if ( !is_null( $this->cachedTimestamp ) ) {
+ if ( is_null( $this->cachedTimestamp ) ) {
$dbr = wfGetDB( DB_SLAVE );
$fname = get_class( $this ) . '::getCachedTimestamp';
$this->cachedTimestamp = $dbr->selectField( 'querycache_info', 'qci_timestamp',
return;
}
- $res = $qp->doQuery( $params['limit'] + 1, $params['offset'] );
+ $res = $qp->doQuery( $params['offset'], $params['limit'] + 1 );
$count = 0;
$titles = array();
foreach ( $res as $row ) {