r93052 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93051‎ | r93052 | r93053 >
Date:16:01, 25 July 2011
Author:maxsem
Status:ok
Tags:
Comment:
Per CR on r86226 renamed a couple of parameters
Modified paths:
  • /trunk/extensions/Gadgets/ApiQueryGadgets.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Gadgets/ApiQueryGadgets.php
@@ -39,8 +39,8 @@
4040 $this->neededNames = isset( $params['names'] )
4141 ? array_flip( $params['names'] )
4242 : false;
43 - $this->listAllowed = isset( $params['allowed'] ) && $params['allowed'];
44 - $this->listEnabled = isset( $params['enabled'] ) && $params['enabled'];
 43+ $this->listAllowed = isset( $params['allowedonly'] ) && $params['allowedonly'];
 44+ $this->listEnabled = isset( $params['enabledonly'] ) && $params['enabledonly'];
4545
4646 $this->getMain()->setCacheMode( $this->listAllowed || $this->listEnabled
4747 ? 'anon-public-user-private' : 'public' );
@@ -152,8 +152,8 @@
153153 ApiBase::PARAM_TYPE => 'string',
154154 ApiBase::PARAM_ISMULTI => true,
155155 ),
156 - 'allowed' => false,
157 - 'enabled' => false,
 156+ 'allowedonly' => false,
 157+ 'enabledonly' => false,
158158 );
159159 }
160160
@@ -179,8 +179,8 @@
180180 ),
181181 'categories' => 'Gadgets from what categories to retrieve',
182182 'names' => 'Name(s) of gadgets to retrieve',
183 - 'allowed' => 'List only gadgets allowed to current user',
184 - 'enabled' => 'List only gadgets enabled by current user',
 183+ 'allowedonly' => 'List only gadgets allowed to current user',
 184+ 'enabledonly' => 'List only gadgets enabled by current user',
185185 );
186186 }
187187
@@ -197,7 +197,7 @@
198198 'Get information about gadgets named "foo" and "bar":',
199199 ' api.php?action=query&list=gadgets&ganames=foo|bar&gaprop=name|desc|category',
200200 'Get a list of gadgets enabled by current user:',
201 - ' api.php?action=query&list=gadgets&gaenabled',
 201+ ' api.php?action=query&list=gadgets&gaenabledonly',
202202 );
203203 }
204204

Follow-up revisions

RevisionCommit summaryAuthorDate
r93125RL2: Merge r93052 from trunkcatrope21:36, 25 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86226Gadgets API: allow filtering by categories, gadget names, allowedness and ena...maxsem18:39, 16 April 2011

Status & tagging log