Index: trunk/phase3/includes/api/ApiParamInfo.php |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | // Get parameters |
43 | 43 | $params = $this->extractRequestParams(); |
44 | 44 | $result = $this->getResult(); |
| 45 | + $queryObj = new ApiQuery($this->getMain(), 'query'); |
45 | 46 | $r = array(); |
46 | 47 | if(is_array($params['modules'])) |
47 | 48 | { |
— | — | @@ -61,7 +62,6 @@ |
62 | 63 | } |
63 | 64 | if(is_array($params['querymodules'])) |
64 | 65 | { |
65 | | - $queryObj = new ApiQuery($this->getMain(), 'query'); |
66 | 66 | $qmodArr = $queryObj->getModules(); |
67 | 67 | foreach($params['querymodules'] as $qm) |
68 | 68 | { |
— | — | @@ -77,6 +77,13 @@ |
78 | 78 | } |
79 | 79 | $result->setIndexedTagName($r['querymodules'], 'module'); |
80 | 80 | } |
| 81 | + if($params['mainmodule']) |
| 82 | + $r['mainmodule'] = $this->getClassInfo($this->getMain()); |
| 83 | + if($params['pagesetmodule']) |
| 84 | + { |
| 85 | + $pageSet = new ApiPageSet($queryObj); |
| 86 | + $r['pagesetmodule'] = $this->getClassInfo($pageSet); |
| 87 | + } |
81 | 88 | $result->addValue(null, $this->getModuleName(), $r); |
82 | 89 | } |
83 | 90 | |
— | — | @@ -147,7 +154,9 @@ |
148 | 155 | ), |
149 | 156 | 'querymodules' => array( |
150 | 157 | ApiBase :: PARAM_ISMULTI => true |
151 | | - ) |
| 158 | + ), |
| 159 | + 'mainmodule' => false, |
| 160 | + 'pagesetmodule' => false, |
152 | 161 | ); |
153 | 162 | } |
154 | 163 | |
— | — | @@ -155,6 +164,8 @@ |
156 | 165 | return array ( |
157 | 166 | 'modules' => 'List of module names (value of the action= parameter)', |
158 | 167 | 'querymodules' => 'List of query module names (value of prop=, meta= or list= parameter)', |
| 168 | + 'mainmodule' => 'Get information about the main (top-level) module as well', |
| 169 | + 'pagesetmodule' => 'Get information about the pageset module (providing titles= and friends) as well', |
159 | 170 | ); |
160 | 171 | } |
161 | 172 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -200,6 +200,7 @@ |
201 | 201 | * (bug 17357) Added movesubpages parameter to action=move |
202 | 202 | * (bug 17433) Added bot flag to list=watchlist&wlprop=flags output |
203 | 203 | * (bug 16740) Added list=protectedtitles |
| 204 | +* Added mainmodule and pagesetmodule parameters to action=paraminfo |
204 | 205 | |
205 | 206 | === Languages updated in 1.15 === |
206 | 207 | |