public function execute() {
//Blank all our variables
- $limit = $user = $start = $end = $user = null;
+ $limit = $user = $start = $end = $dir = null;
//Get our parameters out
extract($this->extractRequestParams());
//Extract the table names, in case we have a prefix
extract($db->tableNames( 'page', 'revision'), EXTR_PREFIX_ALL, 'tbl');
- //STRAIGHT_JOIN option
- $this->addOption('STRAIGHT_JOIN');
-
//We're after the revision table, and the corresponding page row for
//anything we retrieve.
$this->addTables("$tbl_revision LEFT OUTER JOIN $tbl_page ON " .
$this->addOption('LIMIT', $limit + 1);
- $this->addOption('ORDER BY', 'rev_timestamp DESC');
-
//Initialise some variables
$data = array ();
$count = 0;
while ( $row = $db->fetchObject( $res ) ) {
if (++ $count > $limit) {
// We've reached the one extra which shows that there are additional pages to be had. Stop here...
- $this->setContinueEnumParameter('start', ApiQueryBase :: keyToTitle($row->rev_timestamp));
+ $this->setContinueEnumParameter('start', $row->rev_timestamp);
break;
}
protected function getAllowedParams() {
return array (
'limit' => array (
- ApiBase :: PARAM_DFLT => 50,
+ ApiBase :: PARAM_DFLT => 10,
ApiBase :: PARAM_TYPE => 'limit',
ApiBase :: PARAM_MIN => 1,
ApiBase :: PARAM_MAX1 => ApiBase :: LIMIT_BIG1,
while ($row = $db->fetchObject($res)) {
if (++ $count > $limit) {
// We've reached the one extra which shows that there are additional pages to be had. Stop here...
- $this->setContinueEnumParameter('start', ApiQueryBase :: keyToTitle($row->log_timestamp));
+ $this->setContinueEnumParameter('start', $row->log_timestamp);
break;
}