Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php |
— | — | @@ -56,6 +56,9 @@ |
57 | 57 | case 'namespacealiases' : |
58 | 58 | $this->appendNamespaceAliases($p); |
59 | 59 | break; |
| 60 | + case 'specialpagealiases' : |
| 61 | + $this->appendSpecialPageAliases($p); |
| 62 | + break; |
60 | 63 | case 'interwikimap' : |
61 | 64 | $filteriw = isset($params['filteriw']) ? $params['filteriw'] : false; |
62 | 65 | $this->appendInterwikiMap($p, $filteriw); |
— | — | @@ -128,6 +131,20 @@ |
129 | 132 | $this->getResult()->addValue('query', $property, $data); |
130 | 133 | } |
131 | 134 | |
| 135 | + protected function appendSpecialPageAliases($property) |
| 136 | + { |
| 137 | + global $wgLang; |
| 138 | + $data = array(); |
| 139 | + foreach($wgLang->getSpecialPageAliases() as $specialpage => $aliases) |
| 140 | + { |
| 141 | + $arr = array('realname' => $specialpage, 'aliases' => $aliases); |
| 142 | + $this->getResult()->setIndexedTagName($arr['aliases'], 'alias'); |
| 143 | + $data[] = $arr; |
| 144 | + } |
| 145 | + $this->getResult()->setIndexedTagName($data, 'specialpage'); |
| 146 | + $this->getResult()->addValue('query', $property, $data); |
| 147 | + } |
| 148 | + |
132 | 149 | protected function appendInterwikiMap($property, $filter) { |
133 | 150 | |
134 | 151 | $this->resetQueryParams(); |
— | — | @@ -216,6 +233,7 @@ |
217 | 234 | 'general', |
218 | 235 | 'namespaces', |
219 | 236 | 'namespacealiases', |
| 237 | + 'specialpagealiases', |
220 | 238 | 'interwikimap', |
221 | 239 | 'dbrepllag', |
222 | 240 | 'statistics', |
— | — | @@ -238,6 +256,7 @@ |
239 | 257 | ' "general" - Overall system information', |
240 | 258 | ' "namespaces" - List of registered namespaces (localized)', |
241 | 259 | ' "namespacealiases" - List of registered namespace aliases', |
| 260 | + ' "specialpagealiases" - List of special page aliases', |
242 | 261 | ' "statistics" - Returns site statistics', |
243 | 262 | ' "interwikimap" - Returns interwiki map (optionally filtered)', |
244 | 263 | ' "dbrepllag" - Returns database server with the highest replication lag', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -171,6 +171,7 @@ |
172 | 172 | * Added createonly parameter to action=edit |
173 | 173 | * Replaced $wgAPIUCUserPrefixMinLength by the more generic $wgAPIMaxDBRows |
174 | 174 | * (bug 11719) Remove trailing blanks in YAML output. |
| 175 | +* (bug 13541) Added siprop=specialpagealiases to meta=siteinfo |
175 | 176 | |
176 | 177 | === Languages updated in 1.13 === |
177 | 178 | |