Index: trunk/extensions/ArchiveLinks/ApiQueryArchiveFeed.php |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | |
4 | 4 | class ApiQueryArchiveFeed extends ApiQueryBase { |
5 | 5 | function __construct ( $query, $moduleName ) { |
6 | | - parent::__construct( $query, $moduleName, 'al' ); |
| 6 | + parent::__construct( $query, $moduleName, 'arl' ); |
7 | 7 | } |
8 | 8 | |
9 | 9 | public function execute ( ) { |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | |
12 | 12 | $this->addTables( 'el_archive_queue' ); |
13 | 13 | $this->addFields( '*' ); |
14 | | - $this->addWhereRange( 'insertion_time', $params['dir'], $params['start'], $params['end'] ); |
| 14 | + $this->addWhereRange( 'queue_id', $params['dir'], $params['start'], $params['end'] ); |
15 | 15 | $this->addOption( 'LIMIT', $params['limit'] + 1 ); |
16 | 16 | |
17 | 17 | $res = $this->select( __METHOD__ ); |
— | — | @@ -22,10 +22,11 @@ |
23 | 23 | foreach ( $res as $row ) { |
24 | 24 | //much of this is stolen from ApiQueryRecentChanges |
25 | 25 | if ( ++ $count > $params['limit'] ) { |
26 | | - $this->setContinueEnumParameter( 'start', wfTimestamp( TS_UNIX, $row->insertion_time ) ); |
| 26 | + $this->setContinueEnumParameter( 'start', $row->queue_id ); |
27 | 27 | break; |
28 | 28 | } |
29 | 29 | |
| 30 | + $val['feed_id'] = $row->queue_id; |
30 | 31 | $val['time'] = $row->insertion_time; |
31 | 32 | $val['page_id'] = $row->page_id; |
32 | 33 | $val['url'] = $row->url; |
— | — | @@ -33,7 +34,7 @@ |
34 | 35 | $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $val ); |
35 | 36 | |
36 | 37 | if ( !$fit ) { |
37 | | - $this->setContinueEnumParameter( 'start', wfTimestamp( TS_UNIX, $row->insertion_time ) ); |
| 38 | + $this->setContinueEnumParameter( 'start', $row->queue_id ); |
38 | 39 | break; |
39 | 40 | } |
40 | 41 | } |
— | — | @@ -55,10 +56,10 @@ |
56 | 57 | ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2 |
57 | 58 | ), |
58 | 59 | 'start' => array( |
59 | | - ApiBase::PARAM_TYPE => 'timestamp' |
| 60 | + ApiBase::PARAM_TYPE => 'integer' |
60 | 61 | ), |
61 | 62 | 'end' => array( |
62 | | - ApiBase::PARAM_TYPE => 'timestamp' |
| 63 | + ApiBase::PARAM_TYPE => 'integer' |
63 | 64 | ), |
64 | 65 | 'dir' => array( |
65 | 66 | ApiBase::PARAM_DFLT => 'older', |