Merge "Added deprecation comment to constant that when used throws deprecation exception"
[lhc/web/wiklou.git] / includes / api / ApiQuerySiteinfo.php
1 <?php
2 /**
3 *
4 *
5 * Created on Sep 25, 2006
6 *
7 * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * http://www.gnu.org/copyleft/gpl.html
23 *
24 * @file
25 */
26
27 /**
28 * A query action to return meta information about the wiki site.
29 *
30 * @ingroup API
31 */
32 class ApiQuerySiteinfo extends ApiQueryBase {
33
34 public function __construct( $query, $moduleName ) {
35 parent::__construct( $query, $moduleName, 'si' );
36 }
37
38 public function execute() {
39 $params = $this->extractRequestParams();
40 $done = array();
41 $fit = false;
42 foreach ( $params['prop'] as $p ) {
43 switch ( $p ) {
44 case 'general':
45 $fit = $this->appendGeneralInfo( $p );
46 break;
47 case 'namespaces':
48 $fit = $this->appendNamespaces( $p );
49 break;
50 case 'namespacealiases':
51 $fit = $this->appendNamespaceAliases( $p );
52 break;
53 case 'specialpagealiases':
54 $fit = $this->appendSpecialPageAliases( $p );
55 break;
56 case 'magicwords':
57 $fit = $this->appendMagicWords( $p );
58 break;
59 case 'interwikimap':
60 $filteriw = isset( $params['filteriw'] ) ? $params['filteriw'] : false;
61 $fit = $this->appendInterwikiMap( $p, $filteriw );
62 break;
63 case 'dbrepllag':
64 $fit = $this->appendDbReplLagInfo( $p, $params['showalldb'] );
65 break;
66 case 'statistics':
67 $fit = $this->appendStatistics( $p );
68 break;
69 case 'usergroups':
70 $fit = $this->appendUserGroups( $p, $params['numberingroup'] );
71 break;
72 case 'extensions':
73 $fit = $this->appendExtensions( $p );
74 break;
75 case 'fileextensions':
76 $fit = $this->appendFileExtensions( $p );
77 break;
78 case 'rightsinfo':
79 $fit = $this->appendRightsInfo( $p );
80 break;
81 case 'languages':
82 $fit = $this->appendLanguages( $p );
83 break;
84 case 'skins':
85 $fit = $this->appendSkins( $p );
86 break;
87 case 'extensiontags':
88 $fit = $this->appendExtensionTags( $p );
89 break;
90 case 'functionhooks':
91 $fit = $this->appendFunctionHooks( $p );
92 break;
93 case 'showhooks':
94 $fit = $this->appendSubscribedHooks( $p );
95 break;
96 case 'variables':
97 $fit = $this->appendVariables( $p );
98 break;
99 default:
100 ApiBase::dieDebug( __METHOD__, "Unknown prop=$p" );
101 }
102 if ( !$fit ) {
103 // Abuse siprop as a query-continue parameter
104 // and set it to all unprocessed props
105 $this->setContinueEnumParameter( 'prop', implode( '|',
106 array_diff( $params['prop'], $done ) ) );
107 break;
108 }
109 $done[] = $p;
110 }
111 }
112
113 protected function appendGeneralInfo( $property ) {
114 global $wgContLang;
115
116 $data = array();
117 $mainPage = Title::newMainPage();
118 $data['mainpage'] = $mainPage->getPrefixedText();
119 $data['base'] = wfExpandUrl( $mainPage->getFullUrl(), PROTO_CURRENT );
120 $data['sitename'] = $GLOBALS['wgSitename'];
121 $data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}";
122 $data['phpversion'] = phpversion();
123 $data['phpsapi'] = PHP_SAPI;
124 $data['dbtype'] = $GLOBALS['wgDBtype'];
125 $data['dbversion'] = $this->getDB()->getServerVersion();
126
127 $git = SpecialVersion::getGitHeadSha1( $GLOBALS['IP'] );
128 if ( $git ) {
129 $data['git-hash'] = $git;
130 } else {
131 $svn = SpecialVersion::getSvnRevision( $GLOBALS['IP'] );
132 if ( $svn ) {
133 $data['rev'] = $svn;
134 }
135 }
136
137 // 'case-insensitive' option is reserved for future
138 $data['case'] = $GLOBALS['wgCapitalLinks'] ? 'first-letter' : 'case-sensitive';
139
140 if ( isset( $GLOBALS['wgRightsCode'] ) ) {
141 $data['rightscode'] = $GLOBALS['wgRightsCode'];
142 }
143 $data['rights'] = $GLOBALS['wgRightsText'];
144 $data['lang'] = $GLOBALS['wgLanguageCode'];
145
146 $fallbacks = array();
147 foreach( $wgContLang->getFallbackLanguages() as $code ) {
148 $fallbacks[] = array( 'code' => $code );
149 }
150 $data['fallback'] = $fallbacks;
151 $this->getResult()->setIndexedTagName( $data['fallback'], 'lang' );
152
153 if( $wgContLang->hasVariants() ) {
154 $variants = array();
155 foreach( $wgContLang->getVariants() as $code ) {
156 $variants[] = array( 'code' => $code );
157 }
158 $data['variants'] = $variants;
159 $this->getResult()->setIndexedTagName( $data['variants'], 'lang' );
160 }
161
162 if ( $wgContLang->isRTL() ) {
163 $data['rtl'] = '';
164 }
165 $data['fallback8bitEncoding'] = $wgContLang->fallback8bitEncoding();
166
167 if ( wfReadOnly() ) {
168 $data['readonly'] = '';
169 $data['readonlyreason'] = wfReadOnlyReason();
170 }
171 if ( $GLOBALS['wgEnableWriteAPI'] ) {
172 $data['writeapi'] = '';
173 }
174
175 $tz = $GLOBALS['wgLocaltimezone'];
176 $offset = $GLOBALS['wgLocalTZoffset'];
177 if ( is_null( $tz ) ) {
178 $tz = 'UTC';
179 $offset = 0;
180 } elseif ( is_null( $offset ) ) {
181 $offset = 0;
182 }
183 $data['timezone'] = $tz;
184 $data['timeoffset'] = intval( $offset );
185 $data['articlepath'] = $GLOBALS['wgArticlePath'];
186 $data['scriptpath'] = $GLOBALS['wgScriptPath'];
187 $data['script'] = $GLOBALS['wgScript'];
188 $data['variantarticlepath'] = $GLOBALS['wgVariantArticlePath'];
189 $data['server'] = $GLOBALS['wgServer'];
190 $data['wikiid'] = wfWikiID();
191 $data['time'] = wfTimestamp( TS_ISO_8601, time() );
192
193 if ( $GLOBALS['wgMiserMode'] ) {
194 $data['misermode'] = '';
195 }
196
197 $data['maxuploadsize'] = UploadBase::getMaxUploadSize();
198
199 wfRunHooks( 'APIQuerySiteInfoGeneralInfo', array( $this, &$data ) );
200
201 return $this->getResult()->addValue( 'query', $property, $data );
202 }
203
204 protected function appendNamespaces( $property ) {
205 global $wgContLang;
206 $data = array();
207 foreach ( $wgContLang->getFormattedNamespaces() as $ns => $title ) {
208 $data[$ns] = array(
209 'id' => intval( $ns ),
210 'case' => MWNamespace::isCapitalized( $ns ) ? 'first-letter' : 'case-sensitive',
211 );
212 ApiResult::setContent( $data[$ns], $title );
213 $canonical = MWNamespace::getCanonicalName( $ns );
214
215 if ( MWNamespace::hasSubpages( $ns ) ) {
216 $data[$ns]['subpages'] = '';
217 }
218
219 if ( $canonical ) {
220 $data[$ns]['canonical'] = strtr( $canonical, '_', ' ' );
221 }
222
223 if ( MWNamespace::isContent( $ns ) ) {
224 $data[$ns]['content'] = '';
225 }
226
227 if ( MWNamespace::isNonincludable( $ns ) ) {
228 $data[$ns]['nonincludable'] = '';
229 }
230
231 $contentmodel = MWNamespace::getNamespaceContentModel( $ns );
232 if ( $contentmodel ) {
233 $data[$ns]['defaultcontentmodel'] = $contentmodel;
234 }
235 }
236
237 $this->getResult()->setIndexedTagName( $data, 'ns' );
238 return $this->getResult()->addValue( 'query', $property, $data );
239 }
240
241 protected function appendNamespaceAliases( $property ) {
242 global $wgNamespaceAliases, $wgContLang;
243 $aliases = array_merge( $wgNamespaceAliases, $wgContLang->getNamespaceAliases() );
244 $namespaces = $wgContLang->getNamespaces();
245 $data = array();
246 foreach ( $aliases as $title => $ns ) {
247 if ( $namespaces[$ns] == $title ) {
248 // Don't list duplicates
249 continue;
250 }
251 $item = array(
252 'id' => intval( $ns )
253 );
254 ApiResult::setContent( $item, strtr( $title, '_', ' ' ) );
255 $data[] = $item;
256 }
257
258 $this->getResult()->setIndexedTagName( $data, 'ns' );
259 return $this->getResult()->addValue( 'query', $property, $data );
260 }
261
262 protected function appendSpecialPageAliases( $property ) {
263 global $wgContLang;
264 $data = array();
265 $aliases = $wgContLang->getSpecialPageAliases();
266 foreach ( SpecialPageFactory::getList() as $specialpage => $stuff ) {
267 if ( isset( $aliases[$specialpage] ) ) {
268 $arr = array( 'realname' => $specialpage, 'aliases' => $aliases[$specialpage] );
269 $this->getResult()->setIndexedTagName( $arr['aliases'], 'alias' );
270 $data[] = $arr;
271 }
272 }
273 $this->getResult()->setIndexedTagName( $data, 'specialpage' );
274 return $this->getResult()->addValue( 'query', $property, $data );
275 }
276
277 protected function appendMagicWords( $property ) {
278 global $wgContLang;
279 $data = array();
280 foreach ( $wgContLang->getMagicWords() as $magicword => $aliases ) {
281 $caseSensitive = array_shift( $aliases );
282 $arr = array( 'name' => $magicword, 'aliases' => $aliases );
283 if ( $caseSensitive ) {
284 $arr['case-sensitive'] = '';
285 }
286 $this->getResult()->setIndexedTagName( $arr['aliases'], 'alias' );
287 $data[] = $arr;
288 }
289 $this->getResult()->setIndexedTagName( $data, 'magicword' );
290 return $this->getResult()->addValue( 'query', $property, $data );
291 }
292
293 protected function appendInterwikiMap( $property, $filter ) {
294 $local = null;
295 if ( $filter === 'local' ) {
296 $local = 1;
297 } elseif ( $filter === '!local' ) {
298 $local = 0;
299 } elseif ( $filter ) {
300 ApiBase::dieDebug( __METHOD__, "Unknown filter=$filter" );
301 }
302
303 $params = $this->extractRequestParams();
304 $langCode = isset( $params['inlanguagecode'] ) ? $params['inlanguagecode'] : '';
305 $langNames = Language::fetchLanguageNames( $langCode );
306
307 $getPrefixes = Interwiki::getAllPrefixes( $local );
308 $data = array();
309
310 foreach ( $getPrefixes as $row ) {
311 $prefix = $row['iw_prefix'];
312 $val = array();
313 $val['prefix'] = $prefix;
314 if ( $row['iw_local'] == '1' ) {
315 $val['local'] = '';
316 }
317 // $val['trans'] = intval( $row['iw_trans'] ); // should this be exposed?
318 if ( isset( $langNames[$prefix] ) ) {
319 $val['language'] = $langNames[$prefix];
320 }
321 $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT );
322 if( isset( $row['iw_wikiid'] ) ) {
323 $val['wikiid'] = $row['iw_wikiid'];
324 }
325 if( isset( $row['iw_api'] ) ) {
326 $val['api'] = $row['iw_api'];
327 }
328
329 $data[] = $val;
330 }
331
332 $this->getResult()->setIndexedTagName( $data, 'iw' );
333 return $this->getResult()->addValue( 'query', $property, $data );
334 }
335
336 protected function appendDbReplLagInfo( $property, $includeAll ) {
337 global $wgShowHostnames;
338 $data = array();
339 $lb = wfGetLB();
340 if ( $includeAll ) {
341 if ( !$wgShowHostnames ) {
342 $this->dieUsage( 'Cannot view all servers info unless $wgShowHostnames is true', 'includeAllDenied' );
343 }
344
345 $lags = $lb->getLagTimes();
346 foreach ( $lags as $i => $lag ) {
347 $data[] = array(
348 'host' => $lb->getServerName( $i ),
349 'lag' => $lag
350 );
351 }
352 } else {
353 list( $host, $lag, $index ) = $lb->getMaxLag();
354 $data[] = array(
355 'host' => $wgShowHostnames
356 ? $lb->getServerName( $index )
357 : '',
358 'lag' => intval( $lag )
359 );
360 }
361
362 $result = $this->getResult();
363 $result->setIndexedTagName( $data, 'db' );
364 return $this->getResult()->addValue( 'query', $property, $data );
365 }
366
367 protected function appendStatistics( $property ) {
368 global $wgDisableCounters;
369 $data = array();
370 $data['pages'] = intval( SiteStats::pages() );
371 $data['articles'] = intval( SiteStats::articles() );
372 if ( !$wgDisableCounters ) {
373 $data['views'] = intval( SiteStats::views() );
374 }
375 $data['edits'] = intval( SiteStats::edits() );
376 $data['images'] = intval( SiteStats::images() );
377 $data['users'] = intval( SiteStats::users() );
378 $data['activeusers'] = intval( SiteStats::activeUsers() );
379 $data['admins'] = intval( SiteStats::numberingroup( 'sysop' ) );
380 $data['jobs'] = intval( SiteStats::jobs() );
381 return $this->getResult()->addValue( 'query', $property, $data );
382 }
383
384 protected function appendUserGroups( $property, $numberInGroup ) {
385 global $wgGroupPermissions, $wgAddGroups, $wgRemoveGroups, $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf;
386
387 $data = array();
388 $result = $this->getResult();
389 foreach ( $wgGroupPermissions as $group => $permissions ) {
390 $arr = array(
391 'name' => $group,
392 'rights' => array_keys( $permissions, true ),
393 );
394
395 if ( $numberInGroup ) {
396 global $wgAutopromote;
397
398 if ( $group == 'user' ) {
399 $arr['number'] = SiteStats::users();
400
401 // '*' and autopromote groups have no size
402 } elseif ( $group !== '*' && !isset( $wgAutopromote[$group] ) ) {
403 $arr['number'] = SiteStats::numberInGroup( $group );
404 }
405 }
406
407 $groupArr = array(
408 'add' => $wgAddGroups,
409 'remove' => $wgRemoveGroups,
410 'add-self' => $wgGroupsAddToSelf,
411 'remove-self' => $wgGroupsRemoveFromSelf
412 );
413
414 foreach ( $groupArr as $type => $rights ) {
415 if ( isset( $rights[$group] ) ) {
416 $arr[$type] = $rights[$group];
417 $result->setIndexedTagName( $arr[$type], 'group' );
418 }
419 }
420
421 $result->setIndexedTagName( $arr['rights'], 'permission' );
422 $data[] = $arr;
423 }
424
425 $result->setIndexedTagName( $data, 'group' );
426 return $result->addValue( 'query', $property, $data );
427 }
428
429 protected function appendFileExtensions( $property ) {
430 global $wgFileExtensions;
431
432 $data = array();
433 foreach ( $wgFileExtensions as $ext ) {
434 $data[] = array( 'ext' => $ext );
435 }
436 $this->getResult()->setIndexedTagName( $data, 'fe' );
437 return $this->getResult()->addValue( 'query', $property, $data );
438 }
439
440 protected function appendExtensions( $property ) {
441 global $wgExtensionCredits;
442 $data = array();
443 foreach ( $wgExtensionCredits as $type => $extensions ) {
444 foreach ( $extensions as $ext ) {
445 $ret = array();
446 $ret['type'] = $type;
447 if ( isset( $ext['name'] ) ) {
448 $ret['name'] = $ext['name'];
449 }
450 if ( isset( $ext['description'] ) ) {
451 $ret['description'] = $ext['description'];
452 }
453 if ( isset( $ext['descriptionmsg'] ) ) {
454 // Can be a string or array( key, param1, param2, ... )
455 if ( is_array( $ext['descriptionmsg'] ) ) {
456 $ret['descriptionmsg'] = $ext['descriptionmsg'][0];
457 $ret['descriptionmsgparams'] = array_slice( $ext['descriptionmsg'], 1 );
458 $this->getResult()->setIndexedTagName( $ret['descriptionmsgparams'], 'param' );
459 } else {
460 $ret['descriptionmsg'] = $ext['descriptionmsg'];
461 }
462 }
463 if ( isset( $ext['author'] ) ) {
464 $ret['author'] = is_array( $ext['author'] ) ?
465 implode( ', ', $ext['author'] ) : $ext['author'];
466 }
467 if ( isset( $ext['url'] ) ) {
468 $ret['url'] = $ext['url'];
469 }
470 if ( isset( $ext['version'] ) ) {
471 $ret['version'] = $ext['version'];
472 } elseif ( isset( $ext['svn-revision'] ) &&
473 preg_match( '/\$(?:Rev|LastChangedRevision|Revision): *(\d+)/',
474 $ext['svn-revision'], $m ) )
475 {
476 $ret['version'] = 'r' . $m[1];
477 }
478 $data[] = $ret;
479 }
480 }
481
482 $this->getResult()->setIndexedTagName( $data, 'ext' );
483 return $this->getResult()->addValue( 'query', $property, $data );
484 }
485
486 protected function appendRightsInfo( $property ) {
487 global $wgRightsPage, $wgRightsUrl, $wgRightsText;
488 $title = Title::newFromText( $wgRightsPage );
489 $url = $title ? wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ) : $wgRightsUrl;
490 $text = $wgRightsText;
491 if ( !$text && $title ) {
492 $text = $title->getPrefixedText();
493 }
494
495 $data = array(
496 'url' => $url ? $url : '',
497 'text' => $text ? $text : ''
498 );
499
500 return $this->getResult()->addValue( 'query', $property, $data );
501 }
502
503 public function appendLanguages( $property ) {
504 $params = $this->extractRequestParams();
505 $langCode = isset( $params['inlanguagecode'] ) ? $params['inlanguagecode'] : '';
506 $langNames = Language::fetchLanguageNames( $langCode );
507
508 $data = array();
509
510 foreach ( $langNames as $code => $name ) {
511 $lang = array( 'code' => $code );
512 ApiResult::setContent( $lang, $name );
513 $data[] = $lang;
514 }
515 $this->getResult()->setIndexedTagName( $data, 'lang' );
516 return $this->getResult()->addValue( 'query', $property, $data );
517 }
518
519 public function appendSkins( $property ) {
520 $data = array();
521 foreach ( Skin::getSkinNames() as $name => $displayName ) {
522 $skin = array( 'code' => $name );
523 ApiResult::setContent( $skin, $displayName );
524 $data[] = $skin;
525 }
526 $this->getResult()->setIndexedTagName( $data, 'skin' );
527 return $this->getResult()->addValue( 'query', $property, $data );
528 }
529
530 public function appendExtensionTags( $property ) {
531 global $wgParser;
532 $wgParser->firstCallInit();
533 $tags = array_map( array( $this, 'formatParserTags'), $wgParser->getTags() );
534 $this->getResult()->setIndexedTagName( $tags, 't' );
535 return $this->getResult()->addValue( 'query', $property, $tags );
536 }
537
538 public function appendFunctionHooks( $property ) {
539 global $wgParser;
540 $wgParser->firstCallInit();
541 $hooks = $wgParser->getFunctionHooks();
542 $this->getResult()->setIndexedTagName( $hooks, 'h' );
543 return $this->getResult()->addValue( 'query', $property, $hooks );
544 }
545
546 public function appendVariables( $property ) {
547 $variables = MagicWord::getVariableIDs();
548 $this->getResult()->setIndexedTagName( $variables, 'v' );
549 return $this->getResult()->addValue( 'query', $property, $variables );
550 }
551
552 private function formatParserTags( $item ) {
553 return "<{$item}>";
554 }
555
556 public function appendSubscribedHooks( $property ) {
557 global $wgHooks;
558 $myWgHooks = $wgHooks;
559 ksort( $myWgHooks );
560
561 $data = array();
562 foreach ( $myWgHooks as $hook => $hooks ) {
563 $arr = array(
564 'name' => $hook,
565 'subscribers' => array_map( array( 'SpecialVersion', 'arrayToString' ), $hooks ),
566 );
567
568 $this->getResult()->setIndexedTagName( $arr['subscribers'], 's' );
569 $data[] = $arr;
570 }
571
572 $this->getResult()->setIndexedTagName( $data, 'hook' );
573 return $this->getResult()->addValue( 'query', $property, $data );
574 }
575
576 public function getCacheMode( $params ) {
577 return 'public';
578 }
579
580 public function getAllowedParams() {
581 return array(
582 'prop' => array(
583 ApiBase::PARAM_DFLT => 'general',
584 ApiBase::PARAM_ISMULTI => true,
585 ApiBase::PARAM_TYPE => array(
586 'general',
587 'namespaces',
588 'namespacealiases',
589 'specialpagealiases',
590 'magicwords',
591 'interwikimap',
592 'dbrepllag',
593 'statistics',
594 'usergroups',
595 'extensions',
596 'fileextensions',
597 'rightsinfo',
598 'languages',
599 'skins',
600 'extensiontags',
601 'functionhooks',
602 'showhooks',
603 'variables',
604 )
605 ),
606 'filteriw' => array(
607 ApiBase::PARAM_TYPE => array(
608 'local',
609 '!local',
610 )
611 ),
612 'showalldb' => false,
613 'numberingroup' => false,
614 'inlanguagecode' => null,
615 );
616 }
617
618 public function getParamDescription() {
619 $p = $this->getModulePrefix();
620 return array(
621 'prop' => array(
622 'Which sysinfo properties to get:',
623 ' general - Overall system information',
624 ' namespaces - List of registered namespaces and their canonical names',
625 ' namespacealiases - List of registered namespace aliases',
626 ' specialpagealiases - List of special page aliases',
627 ' magicwords - List of magic words and their aliases',
628 ' statistics - Returns site statistics',
629 " interwikimap - Returns interwiki map (optionally filtered, (optionally localised by using {$p}inlanguagecode))",
630 ' dbrepllag - Returns database server with the highest replication lag',
631 ' usergroups - Returns user groups and the associated permissions',
632 ' extensions - Returns extensions installed on the wiki',
633 ' fileextensions - Returns list of file extensions allowed to be uploaded',
634 ' rightsinfo - Returns wiki rights (license) information if available',
635 " languages - Returns a list of languages MediaWiki supports (optionally localised by using {$p}inlanguagecode)",
636 ' skins - Returns a list of all enabled skins',
637 ' extensiontags - Returns a list of parser extension tags',
638 ' functionhooks - Returns a list of parser function hooks',
639 ' showhooks - Returns a list of all subscribed hooks (contents of $wgHooks)',
640 ' variables - Returns a list of variable IDs',
641 ),
642 'filteriw' => 'Return only local or only nonlocal entries of the interwiki map',
643 'showalldb' => 'List all database servers, not just the one lagging the most',
644 'numberingroup' => 'Lists the number of users in user groups',
645 'inlanguagecode' => 'Language code for localised language names (best effort, use CLDR extension)',
646 );
647 }
648
649 public function getDescription() {
650 return 'Return general information about the site';
651 }
652
653 public function getPossibleErrors() {
654 return array_merge( parent::getPossibleErrors(), array(
655 array( 'code' => 'includeAllDenied', 'info' => 'Cannot view all servers info unless $wgShowHostnames is true' ),
656 ) );
657 }
658
659 public function getExamples() {
660 return array(
661 'api.php?action=query&meta=siteinfo&siprop=general|namespaces|namespacealiases|statistics',
662 'api.php?action=query&meta=siteinfo&siprop=interwikimap&sifilteriw=local',
663 'api.php?action=query&meta=siteinfo&siprop=dbrepllag&sishowalldb=',
664 );
665 }
666
667 public function getHelpUrls() {
668 return 'https://www.mediawiki.org/wiki/API:Meta#siteinfo_.2F_si';
669 }
670 }