42 parent::__construct(
'Version' );
55 $out->allowClickjacking();
58 $parts = explode(
'/', (
string)$par );
60 if ( isset( $parts[1] ) ) {
61 $extName = str_replace(
'_',
' ', $parts[1] );
64 foreach ( $extensions as
$ext ) {
65 if ( isset(
$ext[
'name'] ) && (
$ext[
'name'] === $extName ) ) {
72 $out->setStatusCode( 404 );
75 $extName =
'MediaWiki';
79 switch ( strtolower( $parts[0] ) ) {
81 $out->addModuleStyles(
'mediawiki.special.version' );
83 $wikiText =
'{{int:version-credits-not-found}}';
84 if ( $extName ===
'MediaWiki' ) {
85 $wikiText = file_get_contents(
$IP .
'/CREDITS' );
87 $wikiText = str_replace(
88 [
'<!-- BEGIN CONTRIBUTOR LIST -->',
'<!-- END CONTRIBUTOR LIST -->' ],
89 [
'<div class="mw-version-credits">',
'</div>' ],
91 } elseif ( ( $extNode !==
null ) && isset( $extNode[
'path'] ) ) {
94 $wikiText = file_get_contents( $file );
95 if ( substr( $file, -4 ) ===
'.txt' ) {
96 $wikiText = Html::element(
108 $out->setPageTitle( $this->
msg(
'version-credits-title', $extName ) );
109 $out->addWikiText( $wikiText );
113 $wikiText =
'{{int:version-license-not-found}}';
114 if ( $extName ===
'MediaWiki' ) {
115 $wikiText = file_get_contents(
$IP .
'/COPYING' );
116 } elseif ( ( $extNode !==
null ) && isset( $extNode[
'path'] ) ) {
119 $wikiText = file_get_contents( $file );
120 $wikiText = Html::element(
131 $out->setPageTitle( $this->
msg(
'version-license-title', $extName ) );
132 $out->addWikiText( $wikiText );
136 $out->addModuleStyles(
'mediawiki.special.version' );
164 [
'id' =>
'mw-version-license' ],
169 $ret .=
'<div class="plainlinks">';
172 " .
'<div class="mw-version-license-info">' .
173 wfMessage(
'version-license-info' )->text() .
177 return str_replace(
"\t\t",
'',
$ret ) .
"\n";
188 if ( defined(
'MEDIAWIKI_INSTALL' ) ) {
189 $othersLink =
'[https://www.mediawiki.org/wiki/Special:Version/Credits ' .
190 wfMessage(
'version-poweredby-others' )->text() .
']';
192 $othersLink =
'[[Special:Version/Credits|' .
193 wfMessage(
'version-poweredby-others' )->text() .
']]';
196 $translatorsLink =
'[https://translatewiki.net/wiki/Translating:MediaWiki/Credits ' .
197 wfMessage(
'version-poweredby-translators' )->text() .
']';
200 'Magnus Manske',
'Brion Vibber',
'Lee Daniel Crocker',
201 'Tim Starling',
'Erik Möller',
'Gabriel Wicke',
'Ævar Arnfjörð Bjarmason',
202 'Niklas Laxström',
'Domas Mituzas',
'Rob Church',
'Yuri Astrakhan',
203 'Aryeh Gregor',
'Aaron Schulz',
'Andrew Garrett',
'Raimond Spekking',
204 'Alexandre Emsenhuber',
'Siebrand Mazeland',
'Chad Horohoe',
205 'Roan Kattouw',
'Trevor Parscal',
'Bryan Tong Minh',
'Sam Reed',
206 'Victor Vasiliev',
'Rotem Liss',
'Platonides',
'Antoine Musso',
207 'Timo Tijhof',
'Daniel Kinzler',
'Jeroen De Dauw',
'Brad Jorsch',
208 'Bartosz Dziewoński',
'Ed Sanders',
'Moriel Schottlender',
209 $othersLink, $translatorsLink
212 return wfMessage(
'version-poweredby-credits', MWTimestamp::getLocalInstance()->
format(
'Y' ),
213 $wgLang->listToText( $authorList ) )->text();
230 $software[
'[http://hhvm.com/ HHVM]'] = HHVM_VERSION .
" (" . PHP_SAPI .
")";
232 $software[
'[https://php.net/ PHP]'] = PHP_VERSION .
" (" . PHP_SAPI .
")";
234 $software[
$dbr->getSoftwareLink()] =
$dbr->getServerInfo();
241 Hooks::run(
'SoftwareInfo', [ &$software ] );
245 [
'id' =>
'mw-version-software' ],
248 Xml::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-software' ] ) .
250 <th>" .
wfMessage(
'version-software-product' )->text() .
"</th>
251 <th>" .
wfMessage(
'version-software-version' )->text() .
"</th>
254 foreach ( $software as $name => $version ) {
256 <td>" . $name .
"</td>
257 <td dir=\"ltr\">" . $version .
"</td>
261 return $out . Xml::closeElement(
'table' );
277 } elseif ( $flags ===
'nodb' ) {
278 $shortSha1 = substr( $gitInfo, 0, 7 );
279 $version =
"$wgVersion ($shortSha1)";
281 $shortSha1 = substr( $gitInfo, 0, 7 );
283 if (
$lang !==
null ) {
284 $msg->inLanguage(
$lang );
286 $shortSha1 = $msg->params( $shortSha1 )->escaped();
287 $version =
"$wgVersion $shortSha1";
319 if ( Hooks::run(
'SpecialVersionVersionUrl', [
$wgVersion, &$versionUrl ] ) ) {
321 preg_match(
"/^(\d+\.\d+)/",
$wgVersion, $versionParts );
322 $versionUrl =
"https://www.mediawiki.org/wiki/MediaWiki_{$versionParts[1]}";
325 return "[$versionUrl $wgVersion]";
337 $headSHA1 = $gitInfo->getHeadSHA1();
342 $shortSHA1 =
'(' . substr( $headSHA1, 0, 7 ) .
')';
344 $gitHeadUrl = $gitInfo->getHeadViewUrl();
345 if ( $gitHeadUrl !==
false ) {
346 $shortSHA1 =
"[$gitHeadUrl $shortSHA1]";
349 $gitHeadCommitDate = $gitInfo->getHeadCommitDate();
350 if ( $gitHeadCommitDate ) {
351 $shortSHA1 .= Html::element(
'br' ) .
$wgLang->timeanddate( $gitHeadCommitDate,
true );
368 if ( self::$extensionTypes ===
false ) {
369 self::$extensionTypes = [
370 'specialpage' =>
wfMessage(
'version-specialpages' )->text(),
371 'editor' =>
wfMessage(
'version-editors' )->text(),
372 'parserhook' =>
wfMessage(
'version-parserhooks' )->text(),
373 'variable' =>
wfMessage(
'version-variables' )->text(),
374 'media' =>
wfMessage(
'version-mediahandlers' )->text(),
375 'antispam' =>
wfMessage(
'version-antispam' )->text(),
376 'skin' =>
wfMessage(
'version-skins' )->text(),
377 'api' =>
wfMessage(
'version-api' )->text(),
378 'other' =>
wfMessage(
'version-other' )->text(),
381 Hooks::run(
'ExtensionTypes', [ &self::$extensionTypes ] );
399 return isset( $types[
$type] ) ? $types[
$type] : $types[
'other'];
422 [
'id' =>
'mw-version-ext' ],
423 $this->
msg(
'version-extensions' )->
text()
425 Xml::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-ext' ] );
439 $this->firstExtOpened =
false;
443 if (
$type !==
'other' &&
$type !==
'skin' ) {
451 $out .= Xml::closeElement(
'table' );
469 [
'id' =>
'mw-version-skin' ],
470 $this->
msg(
'version-skins' )->
text()
472 Xml::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-skin' ] );
474 $this->firstExtOpened =
false;
477 $out .= Xml::closeElement(
'table' );
489 $path =
"$IP/vendor/composer/installed.json";
490 if ( !file_exists( $path ) ) {
495 $out = Html::element(
497 [
'id' =>
'mw-version-libraries' ],
498 $this->
msg(
'version-libraries' )->
text()
500 $out .= Html::openElement(
502 [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-libraries' ]
504 $out .= Html::openElement(
'tr' )
505 . Html::element(
'th', [], $this->
msg(
'version-libraries-library' )->
text() )
506 . Html::element(
'th', [], $this->
msg(
'version-libraries-version' )->
text() )
507 . Html::element(
'th', [], $this->
msg(
'version-libraries-license' )->
text() )
508 . Html::element(
'th', [], $this->
msg(
'version-libraries-description' )->
text() )
509 . Html::element(
'th', [], $this->
msg(
'version-libraries-authors' )->
text() )
510 . Html::closeElement(
'tr' );
512 foreach ( $installed->getInstalledDependencies() as $name => $info ) {
513 if ( strpos( $info[
'type'],
'mediawiki-' ) === 0 ) {
518 $authors = array_map(
function ( $arr ) {
520 if ( isset( $arr[
'homepage'] ) ) {
521 return "[{$arr['homepage']} {$arr['name']}]";
524 }, $info[
'authors'] );
525 $authors = $this->
listAuthors( $authors,
false,
"$IP/vendor/$name" );
530 $out .= Html::openElement(
'tr' )
535 "https://packagist.org/packages/$name", $name,
537 [
'class' =>
'mw-version-library-name' ]
540 . Html::element(
'td', [
'dir' =>
'auto' ], $info[
'version'] )
541 . Html::element(
'td', [
'dir' =>
'auto' ], $this->
listToText( $info[
'licenses'] ) )
542 . Html::element(
'td', [
'lang' =>
'en',
'dir' =>
'ltr' ], $info[
'description'] )
543 . Html::rawElement(
'td', [], $authors )
544 . Html::closeElement(
'tr' );
546 $out .= Html::closeElement(
'table' );
561 if ( count( $tags ) ) {
562 $out = Html::rawElement(
565 'class' =>
'mw-headline plainlinks',
566 'id' =>
'mw-version-parser-extensiontags',
569 'https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Tag_extensions',
570 $this->
msg(
'version-parser-extensiontags' )->parse(),
575 array_walk( $tags,
function ( &
$value ) {
581 'style' =>
'white-space: nowrap;',
604 if ( count( $fhooks ) ) {
605 $out = Html::rawElement(
608 'class' =>
'mw-headline plainlinks',
609 'id' =>
'mw-version-parser-function-hooks',
612 'https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Parser_functions',
613 $this->
msg(
'version-parser-function-hooks' )->parse(),
661 if ( $a[
'name'] === $b[
'name'] ) {
693 if ( isset( $extension[
'namemsg'] ) ) {
695 $extensionName = $this->
msg( $extension[
'namemsg'] )->text();
696 } elseif ( isset( $extension[
'name'] ) ) {
698 $extensionName = $extension[
'name'];
700 $extensionName = $this->
msg(
'version-no-ext-name' )->text();
703 if ( isset( $extension[
'url'] ) ) {
709 [
'class' =>
'mw-version-ext-name' ]
712 $extensionNameLink = $extensionName;
718 $canonicalVersion =
'–';
719 $extensionPath =
null;
724 if ( isset( $extension[
'version'] ) ) {
725 $canonicalVersion =
$out->parseInline( $extension[
'version'] );
728 if ( isset( $extension[
'path'] ) ) {
730 $extensionPath = dirname( $extension[
'path'] );
731 if ( $this->coreId ==
'' ) {
732 wfDebug(
'Looking up core head id' );
734 if ( $coreHeadSHA1 ) {
735 $this->coreId = $coreHeadSHA1;
739 $memcKey =
$cache->makeKey(
740 'specialversion-ext-version-text', $extension[
'path'], $this->coreId
742 list( $vcsVersion, $vcsLink, $vcsDate ) =
$cache->get( $memcKey );
744 if ( !$vcsVersion ) {
745 wfDebug(
"Getting VCS info for extension {$extension['name']}" );
746 $gitInfo =
new GitInfo( $extensionPath );
747 $vcsVersion = $gitInfo->getHeadSHA1();
748 if ( $vcsVersion !==
false ) {
749 $vcsVersion = substr( $vcsVersion, 0, 7 );
750 $vcsLink = $gitInfo->getHeadViewUrl();
751 $vcsDate = $gitInfo->getHeadCommitDate();
753 $cache->set( $memcKey, [ $vcsVersion, $vcsLink, $vcsDate ], 60 * 60 * 24 );
755 wfDebug(
"Pulled VCS info for extension {$extension['name']} from cache" );
759 $versionString = Html::rawElement(
761 [
'class' =>
'mw-version-ext-version' ],
769 $this->
msg(
'version-version', $vcsVersion ),
772 [
'class' =>
'mw-version-ext-vcs-version' ]
775 $vcsVerString = Html::element(
'span',
776 [
'class' =>
'mw-version-ext-vcs-version' ],
780 $versionString .=
" {$vcsVerString}";
783 $vcsTimeString = Html::element(
'span',
784 [
'class' =>
'mw-version-ext-vcs-timestamp' ],
785 $this->
getLanguage()->timeanddate( $vcsDate,
true )
787 $versionString .=
" {$vcsTimeString}";
789 $versionString = Html::rawElement(
'span',
790 [
'class' =>
'mw-version-ext-meta-version' ],
798 if ( isset( $extension[
'name'] ) ) {
800 if ( isset( $extension[
'license-name'] ) ) {
801 $licenseName =
new HtmlArmor(
$out->parseInline( $extension[
'license-name'] ) );
803 $licenseName = $this->
msg(
'version-ext-license' )->text();
805 if ( $licenseName !==
null ) {
810 'class' =>
'mw-version-ext-license',
820 if ( isset( $extension[
'descriptionmsg'] ) ) {
822 $descriptionMsg = $extension[
'descriptionmsg'];
824 if ( is_array( $descriptionMsg ) ) {
825 $descriptionMsgKey = $descriptionMsg[0];
826 array_shift( $descriptionMsg );
827 array_map(
"htmlspecialchars", $descriptionMsg );
828 $description = $this->
msg( $descriptionMsgKey, $descriptionMsg )->text();
830 $description = $this->
msg( $descriptionMsg )->text();
832 } elseif ( isset( $extension[
'description'] ) ) {
834 $description = $extension[
'description'];
838 $description =
$out->parseInline( $description );
841 $authors = isset( $extension[
'author'] ) ? $extension[
'author'] : [];
842 $authors = $this->
listAuthors( $authors, $extension[
'name'], $extensionPath );
845 $html = Html::openElement(
'tr', [
846 'class' =>
'mw-version-ext',
847 'id' => Sanitizer::escapeIdForAttribute(
'mw-version-ext-' .
$type .
'-' . $extension[
'name'] )
851 $html .= Html::rawElement(
'td', [], $extensionNameLink );
852 $html .= Html::rawElement(
'td', [], $versionString );
853 $html .= Html::rawElement(
'td', [], $licenseLink );
854 $html .= Html::rawElement(
'td', [
'class' =>
'mw-version-ext-description' ], $description );
855 $html .= Html::rawElement(
'td', [
'class' =>
'mw-version-ext-authors' ], $authors );
857 $html .= Html::closeElement(
'tr' );
875 $ret[] =
'== {{int:version-hooks}} ==';
876 $ret[] = Html::openElement(
'table', [
'class' =>
'wikitable',
'id' =>
'sv-hooks' ] );
877 $ret[] = Html::openElement(
'tr' );
878 $ret[] = Html::element(
'th', [], $this->
msg(
'version-hook-name' )->
text() );
879 $ret[] = Html::element(
'th', [], $this->
msg(
'version-hook-subscribedby' )->
text() );
880 $ret[] = Html::closeElement(
'tr' );
882 foreach ( $myWgHooks as $hook => $hooks ) {
883 $ret[] = Html::openElement(
'tr' );
884 $ret[] = Html::element(
'td', [], $hook );
886 $ret[] = Html::closeElement(
'tr' );
889 $ret[] = Html::closeElement(
'table' );
891 return implode(
"\n",
$ret );
900 $opt = [
'colspan' => 5 ];
901 if ( $this->firstExtOpened ) {
903 $out .= Html::rawElement(
'tr', [
'class' =>
'sv-space' ],
904 Html::element(
'td',
$opt )
907 $this->firstExtOpened =
true;
910 $opt[
'id'] =
"sv-$name";
913 if ( $text !==
null ) {
914 $out .= Html::rawElement(
'tr', [],
915 Html::element(
'th',
$opt, $text )
919 $firstHeadingMsg = ( $name ===
'credits-skin' )
920 ?
'version-skin-colheader-name'
921 :
'version-ext-colheader-name';
922 $out .= Html::openElement(
'tr' );
923 $out .= Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
924 $this->
msg( $firstHeadingMsg )->
text() );
925 $out .= Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
926 $this->
msg(
'version-ext-colheader-version' )->
text() );
927 $out .= Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
928 $this->
msg(
'version-ext-colheader-license' )->
text() );
929 $out .= Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
930 $this->
msg(
'version-ext-colheader-description' )->
text() );
931 $out .= Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
932 $this->
msg(
'version-ext-colheader-credits' )->
text() );
933 $out .= Html::closeElement(
'tr' );
944 $ip = str_replace(
'--',
' - ', htmlspecialchars( $this->
getRequest()->getIP() ) );
946 return "<!-- visited from $ip -->\n<span style='display:none'>visited from $ip</span>";
975 foreach ( (array)$authors as $item ) {
976 if ( $item ==
'...' ) {
982 $this->
msg(
'version-poweredby-others' )->
text()
985 $text = $this->
msg(
'version-poweredby-others' )->escaped();
988 } elseif ( substr( $item, -5 ) ==
' ...]' ) {
990 $list[] = $this->
getOutput()->parseInline(
991 substr( $item, 0, -4 ) . $this->
msg(
'version-poweredby-others' )->
text() .
"]"
994 $list[] = $this->
getOutput()->parseInline( $item );
1001 $this->
msg(
'version-poweredby-others' )->
text()
1024 foreach ( scandir( $extDir ) as $file ) {
1025 $fullPath = $extDir . DIRECTORY_SEPARATOR . $file;
1026 if ( preg_match(
'/^((AUTHORS)|(CREDITS))(\.txt|\.wiki|\.mediawiki)?$/', $file ) &&
1027 is_readable( $fullPath ) &&
1028 is_file( $fullPath )
1053 foreach ( scandir( $extDir ) as $file ) {
1054 $fullPath = $extDir . DIRECTORY_SEPARATOR . $file;
1055 if ( preg_match(
'/^((COPYING)|(LICENSE))(\.txt)?$/', $file ) &&
1056 is_readable( $fullPath ) &&
1057 is_file( $fullPath )
1075 if ( !count( $list ) ) {
1083 ->listToText( array_map( [ __CLASS__,
'arrayToString' ], $list ) );
1095 if ( is_array( $list ) && count( $list ) == 1 ) {
1098 if ( $list instanceof Closure ) {
1101 } elseif ( is_object( $list ) ) {
1102 $class =
wfMessage(
'parentheses' )->params( get_class( $list ) )->escaped();
1105 } elseif ( !is_array( $list ) ) {
1108 if ( is_object( $list[0] ) ) {
1109 $class = get_class( $list[0] );
1114 return wfMessage(
'parentheses' )->params(
"$class, {$list[1]}" )->escaped();
1125 return $repo->getHeadSHA1();
1134 return $repo->getCurrentBranch();
1146 'version-entrypoints-scriptpath' => $scriptPath,
1147 'version-entrypoints-index-php' =>
wfScript(
'index' ),
1148 'version-entrypoints-api-php' =>
wfScript(
'api' ),
1149 'version-entrypoints-load-php' =>
wfScript(
'load' ),
1154 'dir' => $language->getDir(),
1155 'lang' => $language->getHtmlCode()
1157 $out = Html::element(
1159 [
'id' =>
'mw-version-entrypoints' ],
1160 $this->
msg(
'version-entrypoints' )->
text()
1162 Html::openElement(
'table',
1164 'class' =>
'wikitable plainlinks',
1165 'id' =>
'mw-version-entrypoints-table',
1170 Html::openElement(
'tr' ) .
1174 $this->
msg(
'version-entrypoints-header-entrypoint' )->
text()
1179 $this->
msg(
'version-entrypoints-header-url' )->
text()
1181 Html::closeElement(
'tr' );
1183 foreach ( $entryPoints as $message =>
$value ) {
1185 $out .= Html::openElement(
'tr' ) .
1188 Html::rawElement(
'td', [], $this->
msg( $message )->
text() ) .
1189 Html::rawElement(
'td', [], Html::rawElement(
'code', [],
"[$url $value]" ) ) .
1190 Html::closeElement(
'tr' );
1193 $out .= Html::closeElement(
'table' );
$wgVersion
MediaWiki version number.
$wgScriptPath
The path we should point to.
$wgSpecialVersionShowHooks
Show the contents of $wgHooks in Special:Version.
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.
wfGetCache( $cacheType)
Get a specific cache object.
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
wfIsHHVM()
Check if we are running under HHVM.
$wgExtensionCredits['specialpage'][]
Reads an installed.json file and provides accessors to get what is installed.
Marks HTML that shouldn't be escaped.
static getICUVersion()
Return the version of ICU library used by PHP's intl extension, or false when the extension is not in...
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
Parent class for all special pages.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getOutput()
Get the OutputPage being used for this instance.
msg( $key)
Wrapper around wfMessage that sets the current context.
getRequest()
Get the WebRequest being used for this instance.
getPageTitle( $subpage=false)
Get a self-referential title object.
getLanguage()
Shortcut to get user's language.
MediaWiki Linker LinkRenderer null $linkRenderer
Give information about the version of MediaWiki, PHP, the DB and extensions.
static getVersionLinked()
Return a wikitext-formatted string of the MediaWiki version with a link to the Git SHA1 of head if av...
static getExtensionTypeName( $type)
Returns the internationalized name for an extension type.
IPInfo()
Get information about client's IP address.
static getGitHeadSha1( $dir)
getParserFunctionHooks()
Obtains a list of installed parser function hooks and the associated H2 header.
listToText( $list, $sort=true)
Convert an array of items into a list for display.
getEntryPointInfo()
Get the list of entry points and their URLs.
getWgHooks()
Generate wikitext showing hooks in $wgHooks.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
listAuthors( $authors, $extName, $extDir)
Return a formatted unsorted list of authors.
$coreId
Stores the current rev id/SHA hash of MediaWiki core.
static softwareInformation()
Returns wiki text showing the third party software versions (apache, php, mysql).
getExtensionCategory( $type, $message)
Creates and returns the HTML for a single extension category.
static getVersionLinkedGit()
static getExtensionTypes()
Returns an array with the base extension types.
openExtType( $text=null, $name=null)
getCreditsForExtension( $type, array $extension)
Creates and formats a version line for a single extension.
static getwgVersionLinked()
static getExtLicenseFileName( $extDir)
Obtains the full path of an extensions copying or license file if one exists.
static getMediaWikiCredits()
Returns wiki text showing the license information.
getParserTags()
Obtains a list of installed parser tags and the associated H2 header.
static getExtAuthorsFileName( $extDir)
Obtains the full path of an extensions authors or credits file if one exists.
getSkinCredits()
Generate wikitext showing the name, URL, author and description of each skin.
getExtensionCredits()
Generate wikitext showing the name, URL, author and description of each extension.
compare( $a, $b)
Callback to sort extensions by type.
static getVersion( $flags='', $lang=null)
Return a string of the MediaWiki version with Git revision if available.
static getCopyrightAndAuthorList()
Get the "MediaWiki is copyright 2001-20xx by lots of cool guys" text.
getExternalLibraries()
Generate an HTML table for external libraries that are installed.
static getGitCurrentBranch( $dir)
static arrayToString( $list)
Convert an array or object to a string for display.
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
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
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 $wgLang
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
if the prop value should be in the metadata multi language array format
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
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out
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 and may include noclasses & $html
$wgHooks['ArticleShow'][]
if(!is_readable( $file)) $ext
if(!isset( $args[0])) $lang