Go to the documentation of this file.
35 parent::__construct(
$query, $moduleName,
'si' );
45 $fit = $this->appendGeneralInfo( $p );
48 $fit = $this->appendNamespaces( $p );
50 case 'namespacealiases':
51 $fit = $this->appendNamespaceAliases( $p );
53 case 'specialpagealiases':
54 $fit = $this->appendSpecialPageAliases( $p );
57 $fit = $this->appendMagicWords( $p );
60 $filteriw = isset(
$params[
'filteriw'] ) ?
$params[
'filteriw'] :
false;
61 $fit = $this->appendInterwikiMap( $p, $filteriw );
64 $fit = $this->appendDbReplLagInfo( $p,
$params[
'showalldb'] );
67 $fit = $this->appendStatistics( $p );
70 $fit = $this->appendUserGroups( $p,
$params[
'numberingroup'] );
73 $fit = $this->appendExtensions( $p );
75 case 'fileextensions':
76 $fit = $this->appendFileExtensions( $p );
79 $fit = $this->appendRightsInfo( $p );
82 $fit = $this->appendRestrictions( $p );
85 $fit = $this->appendLanguages( $p );
88 $fit = $this->appendSkins( $p );
91 $fit = $this->appendExtensionTags( $p );
94 $fit = $this->appendFunctionHooks( $p );
97 $fit = $this->appendSubscribedHooks( $p );
100 $fit = $this->appendVariables( $p );
103 $fit = $this->appendProtocols( $p );
105 case 'defaultoptions':
106 $fit = $this->appendDefaultOptions( $p );
115 array_diff(
$params[
'prop'], $done ) ) );
122 protected function appendGeneralInfo(
$property ) {
127 $data[
'mainpage'] = $mainPage->getPrefixedText();
129 $data[
'sitename'] =
$GLOBALS[
'wgSitename'];
135 $data[
'generator'] =
"MediaWiki {$GLOBALS['wgVersion']}";
136 $data[
'phpversion'] = phpversion();
137 $data[
'phpsapi'] = PHP_SAPI;
138 $data[
'dbtype'] =
$GLOBALS[
'wgDBtype'];
139 $data[
'dbversion'] = $this->
getDB()->getServerVersion();
141 $allowFrom =
array(
'' );
142 $allowException =
true;
143 if ( !
$GLOBALS[
'wgAllowExternalImages'] ) {
144 if (
$GLOBALS[
'wgEnableImageWhitelist'] ) {
145 $data[
'imagewhitelistenabled'] =
'';
147 $allowFrom =
$GLOBALS[
'wgAllowExternalImagesFrom'];
148 $allowException = !empty( $allowFrom );
150 if ( $allowException ) {
151 $data[
'externalimages'] = (
array)$allowFrom;
152 $this->
getResult()->setIndexedTagName( $data[
'externalimages'],
'prefix' );
155 if ( !$wgDisableLangConversion ) {
156 $data[
'langconversion'] =
'';
159 if ( !$wgDisableTitleConversion ) {
160 $data[
'titleconversion'] =
'';
167 $data[
'linkprefix'] =
"/^((?>.*[^$linkPrefixCharset]|))(.+)$/sDu";
169 $data[
'linkprefixcharset'] =
'';
170 $data[
'linkprefix'] =
'';
175 $data[
'linktrail'] = $linktrail;
177 $data[
'linktrail'] =
'';
182 $data[
'git-hash'] = $git;
191 $data[
'case'] =
$GLOBALS[
'wgCapitalLinks'] ?
'first-letter' :
'case-sensitive';
193 $data[
'lang'] =
$GLOBALS[
'wgLanguageCode'];
195 $fallbacks =
array();
197 $fallbacks[] =
array(
'code' => $code );
199 $data[
'fallback'] = $fallbacks;
200 $this->
getResult()->setIndexedTagName( $data[
'fallback'],
'lang' );
210 $data[
'variants'] = $variants;
211 $this->
getResult()->setIndexedTagName( $data[
'variants'],
'lang' );
217 $data[
'fallback8bitEncoding'] =
$wgContLang->fallback8bitEncoding();
220 $data[
'readonly'] =
'';
223 if (
$GLOBALS[
'wgEnableWriteAPI'] ) {
224 $data[
'writeapi'] =
'';
228 $offset =
$GLOBALS[
'wgLocalTZoffset'];
229 if ( is_null( $tz ) ) {
232 } elseif ( is_null( $offset ) ) {
235 $data[
'timezone'] = $tz;
236 $data[
'timeoffset'] = intval( $offset );
237 $data[
'articlepath'] =
$GLOBALS[
'wgArticlePath'];
238 $data[
'scriptpath'] =
$GLOBALS[
'wgScriptPath'];
239 $data[
'script'] =
$GLOBALS[
'wgScript'];
240 $data[
'variantarticlepath'] =
$GLOBALS[
'wgVariantArticlePath'];
241 $data[
'server'] =
$GLOBALS[
'wgServer'];
246 $data[
'misermode'] =
'';
251 $data[
'thumblimits'] =
$GLOBALS[
'wgThumbLimits'];
252 $this->
getResult()->setIndexedTagName( $data[
'thumblimits'],
'limit' );
253 $data[
'imagelimits'] =
array();
254 $this->
getResult()->setIndexedTagName( $data[
'imagelimits'],
'limit' );
259 if ( !empty(
$GLOBALS[
'wgFavicon'] ) ) {
270 protected function appendNamespaces(
$property ) {
275 'id' => intval( $ns ),
282 $data[$ns][
'subpages'] =
'';
286 $data[$ns][
'canonical'] = strtr( $canonical,
'_',
' ' );
290 $data[$ns][
'content'] =
'';
294 $data[$ns][
'nonincludable'] =
'';
298 if ( $contentmodel ) {
299 $data[$ns][
'defaultcontentmodel'] = $contentmodel;
303 $this->
getResult()->setIndexedTagName( $data,
'ns' );
308 protected function appendNamespaceAliases(
$property ) {
313 foreach ( $aliases
as $title => $ns ) {
319 'id' => intval( $ns )
327 $this->
getResult()->setIndexedTagName( $data,
'ns' );
332 protected function appendSpecialPageAliases(
$property ) {
337 if ( isset( $aliases[$specialpage] ) ) {
338 $arr =
array(
'realname' => $specialpage,
'aliases' => $aliases[$specialpage] );
339 $this->
getResult()->setIndexedTagName( $arr[
'aliases'],
'alias' );
343 $this->
getResult()->setIndexedTagName( $data,
'specialpage' );
348 protected function appendMagicWords(
$property ) {
351 foreach (
$wgContLang->getMagicWords()
as $magicword => $aliases ) {
352 $caseSensitive = array_shift( $aliases );
353 $arr =
array(
'name' => $magicword,
'aliases' => $aliases );
354 if ( $caseSensitive ) {
355 $arr[
'case-sensitive'] =
'';
357 $this->
getResult()->setIndexedTagName( $arr[
'aliases'],
'alias' );
360 $this->
getResult()->setIndexedTagName( $data,
'magicword' );
365 protected function appendInterwikiMap(
$property, $filter ) {
367 if ( $filter ===
'local' ) {
369 } elseif ( $filter ===
'!local' ) {
371 } elseif ( $filter ) {
376 $langCode = isset(
$params[
'inlanguagecode'] ) ?
$params[
'inlanguagecode'] :
'';
382 foreach ( $getPrefixes
as $row ) {
383 $prefix = $row[
'iw_prefix'];
385 $val[
'prefix'] = $prefix;
386 if ( $row[
'iw_local'] ==
'1' ) {
389 if ( $row[
'iw_trans'] ==
'1' ) {
392 if ( isset( $langNames[$prefix] ) ) {
393 $val[
'language'] = $langNames[$prefix];
396 if ( isset( $row[
'iw_wikiid'] ) ) {
397 $val[
'wikiid'] = $row[
'iw_wikiid'];
399 if ( isset( $row[
'iw_api'] ) ) {
400 $val[
'api'] = $row[
'iw_api'];
406 $this->
getResult()->setIndexedTagName( $data,
'iw' );
411 protected function appendDbReplLagInfo(
$property, $includeAll ) {
416 if ( !$wgShowHostnames ) {
418 'Cannot view all servers info unless $wgShowHostnames is true',
423 $lags =
$lb->getLagTimes();
424 foreach ( $lags
as $i => $lag ) {
426 'host' =>
$lb->getServerName( $i ),
431 list( , $lag, $index ) =
$lb->getMaxLag();
433 'host' => $wgShowHostnames
434 ?
$lb->getServerName( $index )
436 'lag' => intval( $lag )
441 $result->setIndexedTagName( $data,
'db' );
446 protected function appendStatistics(
$property ) {
447 global $wgDisableCounters;
451 if ( !$wgDisableCounters ) {
466 protected function appendUserGroups(
$property, $numberInGroup ) {
467 global $wgGroupPermissions, $wgAddGroups, $wgRemoveGroups;
468 global $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf;
472 foreach ( $wgGroupPermissions
as $group => $permissions ) {
475 'rights' => array_keys( $permissions,
true ),
478 if ( $numberInGroup ) {
481 if ( $group ==
'user' ) {
484 } elseif ( $group !==
'*' && !isset( $wgAutopromote[$group] ) ) {
485 $arr[
'number'] = SiteStats::numberInGroup( $group );
490 'add' => $wgAddGroups,
491 'remove' => $wgRemoveGroups,
492 'add-self' => $wgGroupsAddToSelf,
493 'remove-self' => $wgGroupsRemoveFromSelf
496 foreach ( $groupArr
as $type => $rights ) {
497 if ( isset( $rights[$group] ) ) {
498 $arr[
$type] = $rights[$group];
503 $result->setIndexedTagName( $arr[
'rights'],
'permission' );
507 $result->setIndexedTagName( $data,
'group' );
512 protected function appendFileExtensions(
$property ) {
519 $this->
getResult()->setIndexedTagName( $data,
'fe' );
524 protected function appendExtensions(
$property ) {
525 global $wgExtensionCredits;
531 if ( isset(
$ext[
'name'] ) ) {
534 if ( isset(
$ext[
'description'] ) ) {
535 $ret[
'description'] =
$ext[
'description'];
537 if ( isset(
$ext[
'descriptionmsg'] ) ) {
539 if ( is_array(
$ext[
'descriptionmsg'] ) ) {
540 $ret[
'descriptionmsg'] =
$ext[
'descriptionmsg'][0];
541 $ret[
'descriptionmsgparams'] = array_slice(
$ext[
'descriptionmsg'], 1 );
542 $this->
getResult()->setIndexedTagName(
$ret[
'descriptionmsgparams'],
'param' );
544 $ret[
'descriptionmsg'] = $ext[
'descriptionmsg'];
547 if ( isset(
$ext[
'author'] ) ) {
548 $ret[
'author'] = is_array(
$ext[
'author'] ) ?
549 implode(
', ',
$ext[
'author'] ) :
$ext[
'author'];
551 if ( isset(
$ext[
'url'] ) ) {
554 if ( isset(
$ext[
'version'] ) ) {
556 } elseif ( isset(
$ext[
'svn-revision'] ) &&
557 preg_match(
'/\$(?:Rev|LastChangedRevision|Revision): *(\d+)/',
558 $ext[
'svn-revision'], $m )
560 $ret[
'version'] =
'r' . $m[1];
562 if ( isset(
$ext[
'path'] ) ) {
563 $extensionPath = dirname(
$ext[
'path'] );
564 $gitInfo =
new GitInfo( $extensionPath );
565 $vcsVersion = $gitInfo->getHeadSHA1();
566 if ( $vcsVersion !==
false ) {
567 $ret[
'vcs-system'] =
'git';
568 $ret[
'vcs-version'] = $vcsVersion;
569 $ret[
'vcs-url'] = $gitInfo->getHeadViewUrl();
570 $vcsDate = $gitInfo->getHeadCommitDate();
571 if ( $vcsDate !==
false ) {
576 if ( $svnInfo !==
false ) {
577 $ret[
'vcs-system'] =
'svn';
578 $ret[
'vcs-version'] = $svnInfo[
'checkout-rev'];
579 $ret[
'vcs-url'] = isset( $svnInfo[
'viewvc-url'] ) ? $svnInfo[
'viewvc-url'] :
'';
584 $ret[
'license-name'] = isset(
$ext[
'license-name'] ) ?
$ext[
'license-name'] :
'';
587 "License/{$ext['name']}"
594 "Credits/{$ext['name']}"
602 $this->
getResult()->setIndexedTagName( $data,
'ext' );
607 protected function appendRightsInfo(
$property ) {
608 global $wgRightsPage, $wgRightsUrl, $wgRightsText;
611 $text = $wgRightsText;
613 $text =
$title->getPrefixedText();
617 'url' => $url ? $url :
'',
618 'text' => $text ? $text :
''
624 protected function appendRestrictions(
$property ) {
625 global $wgRestrictionTypes, $wgRestrictionLevels,
626 $wgCascadingRestrictionLevels, $wgSemiprotectedRestrictionLevels;
629 'types' => $wgRestrictionTypes,
630 'levels' => $wgRestrictionLevels,
631 'cascadinglevels' => $wgCascadingRestrictionLevels,
632 'semiprotectedlevels' => $wgSemiprotectedRestrictionLevels,
635 $this->
getResult()->setIndexedTagName( $data[
'types'],
'type' );
636 $this->
getResult()->setIndexedTagName( $data[
'levels'],
'level' );
637 $this->
getResult()->setIndexedTagName( $data[
'cascadinglevels'],
'level' );
638 $this->
getResult()->setIndexedTagName( $data[
'semiprotectedlevels'],
'level' );
643 public function appendLanguages(
$property ) {
645 $langCode = isset(
$params[
'inlanguagecode'] ) ?
$params[
'inlanguagecode'] :
'';
650 foreach ( $langNames
as $code =>
$name ) {
651 $lang =
array(
'code' => $code );
655 $this->
getResult()->setIndexedTagName( $data,
'lang' );
660 public function appendSkins(
$property ) {
667 if ( !isset( $allowed[
$name] ) ) {
668 $skin[
'unusable'] =
'';
670 if (
$name === $default ) {
671 $skin[
'default'] =
'';
675 $this->
getResult()->setIndexedTagName( $data,
'skin' );
680 public function appendExtensionTags(
$property ) {
683 $tags = array_map(
array( $this,
'formatParserTags' ),
$wgParser->getTags() );
684 $this->
getResult()->setIndexedTagName( $tags,
't' );
689 public function appendFunctionHooks(
$property ) {
693 $this->
getResult()->setIndexedTagName( $hooks,
'h' );
698 public function appendVariables(
$property ) {
700 $this->
getResult()->setIndexedTagName( $variables,
'v' );
705 public function appendProtocols(
$property ) {
708 $protocols = array_values( $wgUrlProtocols );
709 $this->
getResult()->setIndexedTagName( $protocols,
'p' );
714 public function appendDefaultOptions(
$property ) {
718 private function formatParserTags( $item ) {
722 public function appendSubscribedHooks(
$property ) {
728 foreach ( $myWgHooks
as $hook => $hooks ) {
731 'subscribers' => array_map(
array(
'SpecialVersion',
'arrayToString' ), $hooks ),
734 $this->
getResult()->setIndexedTagName( $arr[
'subscribers'],
's' );
738 $this->
getResult()->setIndexedTagName( $data,
'hook' );
756 'specialpagealiases',
782 'showalldb' =>
false,
783 'numberingroup' =>
false,
784 'inlanguagecode' =>
null,
793 'Which sysinfo properties to get:',
794 ' general - Overall system information',
795 ' namespaces - List of registered namespaces and their canonical names',
796 ' namespacealiases - List of registered namespace aliases',
797 ' specialpagealiases - List of special page aliases',
798 ' magicwords - List of magic words and their aliases',
799 ' statistics - Returns site statistics',
800 ' interwikimap - Returns interwiki map ' .
801 "(optionally filtered, (optionally localised by using {$p}inlanguagecode))",
802 ' dbrepllag - Returns database server with the highest replication lag',
803 ' usergroups - Returns user groups and the associated permissions',
804 ' extensions - Returns extensions installed on the wiki',
805 ' fileextensions - Returns list of file extensions allowed to be uploaded',
806 ' rightsinfo - Returns wiki rights (license) information if available',
807 ' restrictions - Returns information on available restriction (protection) types',
808 ' languages - Returns a list of languages MediaWiki supports' .
809 "(optionally localised by using {$p}inlanguagecode)",
810 ' skins - Returns a list of all enabled skins',
811 ' extensiontags - Returns a list of parser extension tags',
812 ' functionhooks - Returns a list of parser function hooks',
813 ' showhooks - Returns a list of all subscribed hooks (contents of $wgHooks)',
814 ' variables - Returns a list of variable IDs',
815 ' protocols - Returns a list of protocols that are allowed in external links.',
816 ' defaultoptions - Returns the default values for user preferences.',
818 'filteriw' =>
'Return only local or only nonlocal entries of the interwiki map',
819 'showalldb' =>
'List all database servers, not just the one lagging the most',
820 'numberingroup' =>
'Lists the number of users in user groups',
821 'inlanguagecode' =>
'Language code for localised language names ' .
822 '(best effort, use CLDR extension)',
827 return 'Return general information about the site.';
831 return array_merge( parent::getPossibleErrors(),
array(
array(
832 'code' =>
'includeAllDenied',
833 'info' =>
'Cannot view all servers info unless $wgShowHostnames is true'
839 'api.php?action=query&meta=siteinfo&siprop=general|namespaces|namespacealiases|statistics',
840 'api.php?action=query&meta=siteinfo&siprop=interwikimap&sifilteriw=local',
841 'api.php?action=query&meta=siteinfo&siprop=dbrepllag&sishowalldb=',
846 return 'https://www.mediawiki.org/wiki/API:Meta#siteinfo_.2F_si';
static getList()
Get the special page list.
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. $title:Title object for the current page $request:WebRequest $ignoreRedirect:boolean to skip redirect check $target:Title/string of redirect target $article:Article object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) $article:article(object) being checked 'IsTrustedProxy':Override the result of wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of User::isValidEmailAddr(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetMagic':DEPRECATED, use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetSpecialPageAliases':DEPRECATED, use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LinkBegin':Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
static isNonincludable( $index)
It is not possible to use pages from this namespace as template?
static getExtAuthorsFileName( $extDir)
Obtains the full path of an extensions authors or credits file if one exists.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
static setContent(&$arr, $value, $subElemName=null)
Adds a content element to an array.
wfGetLB( $wiki=false)
Get a load balancer object.
static newMainPage()
Create a new Title for the Main Page.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
static getNamespaceContentModel( $index)
Get the default content model for a namespace This does not mean that all pages in that namespace hav...
getResult()
Get the result object.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
static numberingroup( $group)
Find the number of users in a given user group.
static getAllPrefixes( $local=null)
Returns all interwiki prefixes.
wfReadOnly()
Check whether the wiki is in read-only mode.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the content language as $wgContLang
$wgHooks['ArticleShow'][]
static getSvnRevision( $dir)
Retrieve the revision number of a Subversion working directory.
static getSkinNames()
Fetch the set of available skins.
static getDefaultOptions()
Combine the language default options with any site-specific options and add the default language vari...
getParamDescription()
Returns an array of parameter descriptions.
__construct(ApiBase $query, $moduleName, $paramPrefix='')
if( $wgAPIRequestLog) $lb
static getVariableIDs()
Get an array of parser variable IDs.
static normalizeKey( $key)
Normalize a skin preference value to a form that can be loaded.
static fetchLanguageNames( $inLanguage=null, $include='mw')
Get an array of language names, indexed by code.
This is a base class for all Query modules.
getDescription()
Returns the description string for this module.
const TS_ISO_8601
ISO 8601 format with no timezone: 1986-02-09T20:00:00Z.
getDB()
Get the Query database connection (read-only)
static isContent( $index)
Does this namespace contain content, for the purposes of calculating statistics, etc?
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
static hasSubpages( $index)
Does the namespace allow subpages?
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
if(! $wgHtml5Version && $wgAllowRdfaAttributes) $wgFileExtensions
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
static getExtLicenseFileName( $extDir)
Obtains the full path of an extensions copying or license file if one exists.
getModulePrefix()
Get parameter prefix (usually two letters or an empty string).
wfWikiID()
Get an ASCII string identifying this wiki This is used as a prefix in memcached keys.
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
presenting them properly to the user as errors is done by the caller $title
Allows to change the fields on the form that will be generated $name
$wgNamespaceAliases['Image']
The canonical names of namespaces 6 and 7 are, as of v1.14, "File" and "File_talk".
dieUsage( $description, $errorCode, $httpRespCode=0, $extradata=null)
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an...
static getSvnInfo( $dir)
Get an associative array of information about a given path, from its .svn subdirectory.
static getGitHeadSha1( $dir)
getCacheMode( $params)
Get the cache mode for the data generated by this module.
static getMaxUploadSize( $forType=null)
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned $skin
namespace and then decline to actually register it & $namespaces
wfReadOnlyReason()
Get the value of $wgReadOnly or the contents of $wgReadOnlyFile.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static isCapitalized( $index)
Is the namespace first-letter capitalized?
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
getExamples()
Returns usage examples for this module.
static getAllowedSkins()
Fetch the list of user-selectable skins in regards to $wgSkipSkins.
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
static dieDebug( $method, $message)
Internal code errors should be reported with this method.
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
static getCanonicalName( $index)
Returns the canonical (English) name for a given index.
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.