r62985 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62984‎ | r62985 | r62986 >
Date:23:20, 25 February 2010
Author:jeroendedauw
Status:ok
Tags:
Comment:
Modified paths:
  • /trunk/extensions/Storyboard/api/ApiStoryboardStoriesFeed.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/api/ApiStoryboardStoriesFeed.php
@@ -35,7 +35,7 @@
3636 */
3737 class ApiStoryboardStoriesFeed extends ApiQueryBase {
3838 public function __construct( $main, $action ) {
39 - parent :: __construct( $main, $action );
 39+ parent :: __construct( $main, $action, 'st' );
4040 }
4141
4242 /**
@@ -45,8 +45,7 @@
4646 // Get the requests parameters.
4747 $params = $this->extractRequestParams();
4848
49 - // Get a slave db object to do read operations against.
50 - $dbr = wfGetDB( DB_SLAVE );
 49+
5150 }
5251
5352 /**
@@ -55,17 +54,14 @@
5655 */
5756 public function getAllowedParams() {
5857 return array (
59 - 'offset' => array (
60 - ApiBase :: PARAM_DFLT => 0,
61 - ApiBase :: PARAM_TYPE => 'integer',
62 - ApiBase :: PARAM_MIN => 0,
63 - ),
64 - 'size' => array (
65 - ApiBase :: PARAM_DFLT => 5,
66 - ApiBase :: PARAM_TYPE => 'integer',
 58+ 'limit' => array(
 59+ ApiBase :: PARAM_DFLT => 10,
 60+ ApiBase :: PARAM_TYPE => 'limit',
6761 ApiBase :: PARAM_MIN => 1,
68 - ApiBase :: PARAM_MAX => 100,
69 - ),
 62+ ApiBase :: PARAM_MAX => ApiBase :: LIMIT_BIG1,
 63+ ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2
 64+ ),
 65+ 'continue' => null,
7066 );
7167 }
7268
@@ -94,9 +90,9 @@
9591 */
9692 protected function getExamples() {
9793 return array (
98 - 'api.php?action=stories',
99 - 'api.php?action=stories&offset=42',
100 - 'api.php?action=stories&offset=4&size=2',
 94+ 'api.php?action=query&list=stories',
 95+ 'api.php?action=query&list=stories&stcontinue=42',
 96+ 'api.php?action=query&list=stories&stcontinue=4&stlimit=2',
10197 );
10298 }
10399

Status & tagging log