67 parent::__construct(
'Version' );
68 $this->parser = $parser;
69 $this->urlUtils = $urlUtils;
82 $credits[$credit[
'type']][] = $credit;
93 $config = $this->getConfig();
97 $this->outputHeader();
98 $out = $this->getOutput();
99 $out->setPreventClickjacking(
false );
102 $parts = explode(
'/', (
string)$par );
104 if ( isset( $parts[1] ) ) {
105 $extName = str_replace(
'_',
' ', $parts[1] );
107 foreach ( $credits as $extensions ) {
108 foreach ( $extensions as
$ext ) {
109 if ( isset(
$ext[
'name'] ) && (
$ext[
'name'] === $extName ) ) {
116 $out->setStatusCode( 404 );
119 $extName =
'MediaWiki';
123 switch ( strtolower( $parts[0] ) ) {
125 $out->addModuleStyles(
'mediawiki.special' );
127 $wikiText =
'{{int:version-credits-not-found}}';
128 if ( $extName ===
'MediaWiki' ) {
129 $wikiText = file_get_contents(
$IP .
'/CREDITS' );
131 $wikiText = str_replace(
132 [
'<!-- BEGIN CONTRIBUTOR LIST -->',
'<!-- END CONTRIBUTOR LIST -->' ],
133 [
'<div class="mw-version-credits">',
'</div>' ],
135 } elseif ( ( $extNode !==
null ) && isset( $extNode[
'path'] ) ) {
136 $file = ExtensionInfo::getAuthorsFileName( dirname( $extNode[
'path'] ) );
138 $wikiText = file_get_contents(
$file );
139 if ( str_ends_with(
$file,
'.txt' ) ) {
152 $out->setPageTitle( $this->msg(
'version-credits-title', $extName ) );
153 $out->addWikiTextAsInterface( $wikiText );
157 $out->setPageTitle( $this->msg(
'version-license-title', $extName ) );
159 $licenseFound =
false;
161 if ( $extName ===
'MediaWiki' ) {
162 $out->addWikiTextAsInterface(
163 file_get_contents(
$IP .
'/COPYING' )
165 $licenseFound =
true;
166 } elseif ( ( $extNode !==
null ) && isset( $extNode[
'path'] ) ) {
167 $files = ExtensionInfo::getLicenseFileNames( dirname( $extNode[
'path'] ) );
169 $licenseFound =
true;
170 foreach ( $files as
$file ) {
171 $out->addWikiTextAsInterface(
178 file_get_contents(
$file )
184 if ( !$licenseFound ) {
185 $out->addWikiTextAsInterface(
'{{int:version-license-not-found}}' );
190 $out->addModuleStyles(
'mediawiki.special' );
191 $out->addWikiTextAsInterface(
192 self::getMediaWikiCredits() .
193 self::softwareInformation() .
194 $this->getEntryPointInfo()
197 $this->getSkinCredits( $credits ) .
198 $this->getExtensionCredits( $credits ) .
199 $this->getExternalLibraries( $credits ) .
200 $this->getParserTags() .
201 $this->getParserFunctionHooks()
203 $out->addWikiTextAsInterface( $this->getHooks() );
204 $out->addHTML( $this->IPInfo() );
215 private static function getMediaWikiCredits() {
218 [
'id' =>
'mw-version-license' ],
223 $ret .=
'<div class="plainlinks">';
225 " . self::getCopyrightAndAuthorList() .
"\n
226 " .
'<div class="mw-version-license-info">' .
227 wfMessage(
'version-license-info' )->text() .
231 return str_replace(
"\t\t",
'', $ret ) .
"\n";
240 if ( defined(
'MEDIAWIKI_INSTALL' ) ) {
241 $othersLink =
'[https://www.mediawiki.org/wiki/Special:Version/Credits ' .
242 wfMessage(
'version-poweredby-others' )->text() .
']';
244 $othersLink =
'[[Special:Version/Credits|' .
245 wfMessage(
'version-poweredby-others' )->text() .
']]';
248 $translatorsLink =
'[https://translatewiki.net/wiki/Translating:MediaWiki/Credits ' .
249 wfMessage(
'version-poweredby-translators' )->text() .
']';
252 'Magnus Manske',
'Brion Vibber',
'Lee Daniel Crocker',
253 'Tim Starling',
'Erik Möller',
'Gabriel Wicke',
'Ævar Arnfjörð Bjarmason',
254 'Niklas Laxström',
'Domas Mituzas',
'Rob Church',
'Yuri Astrakhan',
255 'Aryeh Gregor',
'Aaron Schulz',
'Andrew Garrett',
'Raimond Spekking',
256 'Alexandre Emsenhuber',
'Siebrand Mazeland',
'Chad Horohoe',
257 'Roan Kattouw',
'Trevor Parscal',
'Bryan Tong Minh',
'Sam Reed',
258 'Victor Vasiliev',
'Rotem Liss',
'Platonides',
'Antoine Musso',
259 'Timo Tijhof',
'Daniel Kinzler',
'Jeroen De Dauw',
'Brad Jorsch',
260 'Bartosz Dziewoński',
'Ed Sanders',
'Moriel Schottlender',
261 'Kunal Mehta',
'James D. Forrester',
'Brian Wolff',
'Adam Shorland',
262 'DannyS712',
'Ori Livneh',
263 $othersLink, $translatorsLink
275 private static function getSoftwareInformation() {
282 '[https://www.mediawiki.org/ MediaWiki]' => self::getVersionLinked(),
283 '[https://php.net/ PHP]' => PHP_VERSION .
" (" . PHP_SAPI .
")",
284 '[https://icu.unicode.org/ ICU]' => INTL_ICU_VERSION,
285 $dbr->getSoftwareLink() =>
$dbr->getServerInfo(),
299 private static function softwareInformation() {
302 [
'id' =>
'mw-version-software' ],
305 Xml::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-software' ] ) .
307 <th>" .
wfMessage(
'version-software-product' )->text() .
"</th>
308 <th>" .
wfMessage(
'version-software-version' )->text() .
"</th>
311 foreach ( self::getSoftwareInformation() as $name => $version ) {
313 <td>" . $name .
"</td>
314 <td dir=\"ltr\">" . $version .
"</td>
332 $gitInfo = self::getGitHeadSha1(
$IP );
335 } elseif ( $flags ===
'nodb' ) {
336 $shortSha1 = substr( $gitInfo, 0, 7 );
339 $shortSha1 = substr( $gitInfo, 0, 7 );
341 if (
$lang !==
null ) {
342 $msg->inLanguage(
$lang );
344 $shortSha1 = $msg->params( $shortSha1 )->escaped();
359 $gitVersion = self::getVersionLinkedGit();
372 private static function getMWVersionLinked() {
376 preg_match(
"/^(\d+\.\d+)/",
MW_VERSION, $versionParts );
377 $versionUrl =
"https://www.mediawiki.org/wiki/MediaWiki_{$versionParts[1]}";
380 return '[' . $versionUrl .
' ' .
MW_VERSION .
']';
388 private static function getVersionLinkedGit() {
392 $headSHA1 = $gitInfo->getHeadSHA1();
397 $shortSHA1 =
'(' . substr( $headSHA1, 0, 7 ) .
')';
399 $gitHeadUrl = $gitInfo->getHeadViewUrl();
400 if ( $gitHeadUrl !==
false ) {
401 $shortSHA1 =
"[$gitHeadUrl $shortSHA1]";
404 $gitHeadCommitDate = $gitInfo->getHeadCommitDate();
405 if ( $gitHeadCommitDate ) {
409 return self::getMWVersionLinked() .
" $shortSHA1";
422 if ( self::$extensionTypes === false ) {
423 self::$extensionTypes = [
424 'specialpage' =>
wfMessage(
'version-specialpages' )->text(),
425 'editor' =>
wfMessage(
'version-editors' )->text(),
426 'parserhook' =>
wfMessage(
'version-parserhooks' )->text(),
427 'variable' =>
wfMessage(
'version-variables' )->text(),
428 'media' =>
wfMessage(
'version-mediahandlers' )->text(),
429 'antispam' =>
wfMessage(
'version-antispam' )->text(),
430 'skin' =>
wfMessage(
'version-skins' )->text(),
431 'api' =>
wfMessage(
'version-api' )->text(),
432 'other' =>
wfMessage(
'version-other' )->text(),
438 return self::$extensionTypes;
451 $types = self::getExtensionTypes();
453 return $types[
$type] ?? $types[
'other'];
462 private function getExtensionCredits( array $credits ) {
466 ( count( $credits ) === 1 && isset( $credits[
'skin'] ) )
471 $extensionTypes = self::getExtensionTypes();
475 [
'id' =>
'mw-version-ext' ],
476 $this->msg(
'version-extensions' )->text()
478 Xml::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-ext' ] );
481 if ( !array_key_exists(
'other', $credits ) ) {
482 $credits[
'other'] = [];
486 foreach ( $credits as
$type => $extensions ) {
487 if ( !array_key_exists(
$type, $extensionTypes ) ) {
488 $credits[
'other'] = array_merge( $credits[
'other'], $extensions );
492 $this->firstExtOpened =
false;
494 foreach ( $extensionTypes as
$type => $text ) {
496 if (
$type !==
'other' &&
$type !==
'skin' ) {
497 $out .= $this->getExtensionCategory(
$type, $text, $credits[
$type] ?? [] );
502 $out .= $this->getExtensionCategory(
'other', $extensionTypes[
'other'], $credits[
'other'] );
515 private function getSkinCredits( array $credits ) {
516 if ( !isset( $credits[
'skin'] ) || !$credits[
'skin'] ) {
522 [
'id' =>
'mw-version-skin' ],
523 $this->msg(
'version-skins' )->text()
525 Html::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-skin' ] );
527 $this->firstExtOpened =
false;
528 $out .= $this->getExtensionCategory(
'skin',
null, $credits[
'skin'] );
544 "$IP/vendor/composer/installed.json"
547 $extensionTypes = self::getExtensionTypes();
548 foreach ( $extensionTypes as
$type => $message ) {
549 if ( !isset( $credits[
$type] ) || $credits[
$type] === [] ) {
552 foreach ( $credits[
$type] as $extension ) {
553 if ( !isset( $extension[
'path'] ) ) {
556 $paths[] = dirname( $extension[
'path'] ) .
'/vendor/composer/installed.json';
562 foreach ( $paths as
$path ) {
563 if ( !file_exists(
$path ) ) {
569 $dependencies += $installed->getInstalledDependencies();
572 if ( $dependencies === [] ) {
576 ksort( $dependencies );
580 [
'id' =>
'mw-version-libraries' ],
581 $this->msg(
'version-libraries' )->text()
585 [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-libraries' ]
588 .
Html::element(
'th', [], $this->msg(
'version-libraries-library' )->text() )
589 .
Html::element(
'th', [], $this->msg(
'version-libraries-version' )->text() )
590 .
Html::element(
'th', [], $this->msg(
'version-libraries-license' )->text() )
591 .
Html::element(
'th', [], $this->msg(
'version-libraries-description' )->text() )
592 .
Html::element(
'th', [], $this->msg(
'version-libraries-authors' )->text() )
595 foreach ( $dependencies as $name => $info ) {
596 if ( !is_array( $info ) || str_starts_with( $info[
'type'],
'mediawiki-' ) ) {
601 $authors = array_map(
static function ( $arr ) {
603 if ( isset( $arr[
'homepage'] ) ) {
604 return "[{$arr['homepage']} {$arr['name']}]";
607 }, $info[
'authors'] );
608 $authors = $this->listAuthors( $authors,
false,
"$IP/vendor/$name" );
617 "mw-version-library-$name"
622 Linker::makeExternalLink(
623 "https://packagist.org/packages/$name", $name,
625 [
'class' =>
'mw-version-library-name' ]
628 .
Html::element(
'td', [
'dir' =>
'auto' ], $info[
'version'] )
630 .
Html::element(
'td', [
'dir' =>
'auto' ], $this->listToText( $info[
'licenses'] ) )
631 .
Html::element(
'td', [
'lang' =>
'en',
'dir' =>
'ltr' ], $info[
'description'] )
646 $tags = $this->parser->getTags();
653 [
'id' =>
'mw-version-parser-extensiontags' ],
656 [
'class' =>
'plainlinks' ],
657 Linker::makeExternalLink(
658 'https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Tag_extensions',
659 $this->msg(
'version-parser-extensiontags' )->text()
664 array_walk( $tags,
static function ( &$value ) {
670 'style' =>
'white-space: nowrap;',
676 $out .= $this->listToText( $tags );
687 $funcHooks = $this->parser->getFunctionHooks();
694 [
'id' =>
'mw-version-parser-function-hooks' ],
697 [
'class' =>
'plainlinks' ],
698 Linker::makeExternalLink(
699 'https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Parser_functions',
700 $this->msg(
'version-parser-function-hooks' )->text()
705 $out .= $this->listToText( $funcHooks );
722 if ( $creditsGroup ) {
723 $out .= $this->openExtType( $text,
'credits-' .
$type );
725 usort( $creditsGroup, [ $this,
'compare' ] );
727 foreach ( $creditsGroup as $extension ) {
728 $out .= $this->getCreditsForExtension(
$type, $extension );
742 return $this->getLanguage()->lc( $a[
'name'] ) <=> $this->getLanguage()->lc( $b[
'name'] );
764 $out = $this->getOutput();
768 if ( isset( $extension[
'namemsg'] ) ) {
770 $extensionName = $this->msg( $extension[
'namemsg'] )->text();
771 } elseif ( isset( $extension[
'name'] ) ) {
773 $extensionName = $extension[
'name'];
775 $extensionName = $this->msg(
'version-no-ext-name' )->text();
778 if ( isset( $extension[
'url'] ) ) {
779 $extensionNameLink = Linker::makeExternalLink(
784 [
'class' =>
'mw-version-ext-name' ]
787 $extensionNameLink = htmlspecialchars( $extensionName );
793 $canonicalVersion =
'–';
794 $extensionPath =
null;
799 if ( isset( $extension[
'version'] ) ) {
800 $canonicalVersion = $out->parseInlineAsInterface( $extension[
'version'] );
803 if ( isset( $extension[
'path'] ) ) {
805 $extensionPath = dirname( $extension[
'path'] );
806 if ( $this->coreId ==
'' ) {
807 wfDebug(
'Looking up core head id' );
808 $coreHeadSHA1 = self::getGitHeadSha1(
$IP );
809 if ( $coreHeadSHA1 ) {
810 $this->coreId = $coreHeadSHA1;
814 $memcKey = $cache->makeKey(
815 'specialversion-ext-version-text', $extension[
'path'], $this->coreId
817 [ $vcsVersion, $vcsLink, $vcsDate ] = $cache->get( $memcKey );
819 if ( !$vcsVersion ) {
820 wfDebug(
"Getting VCS info for extension {$extension['name']}" );
821 $gitInfo =
new GitInfo( $extensionPath );
822 $vcsVersion = $gitInfo->getHeadSHA1();
823 if ( $vcsVersion !==
false ) {
824 $vcsVersion = substr( $vcsVersion, 0, 7 );
825 $vcsLink = $gitInfo->getHeadViewUrl();
826 $vcsDate = $gitInfo->getHeadCommitDate();
828 $cache->set( $memcKey, [ $vcsVersion, $vcsLink, $vcsDate ], 60 * 60 * 24 );
830 wfDebug(
"Pulled VCS info for extension {$extension['name']} from cache" );
836 [
'class' =>
'mw-version-ext-version' ],
842 $vcsVerString = Linker::makeExternalLink(
844 $this->msg(
'version-version', $vcsVersion )->text(),
847 [
'class' =>
'mw-version-ext-vcs-version' ]
851 [
'class' =>
'mw-version-ext-vcs-version' ],
855 $versionString .=
" {$vcsVerString}";
859 'class' =>
'mw-version-ext-vcs-timestamp',
860 'dir' => $this->getLanguage()->getDir(),
861 ], $this->getLanguage()->timeanddate( $vcsDate,
true ) );
864 [
'class' =>
'mw-version-ext-meta-version' ],
872 if ( isset( $extension[
'name'] ) ) {
874 if ( isset( $extension[
'license-name'] ) ) {
875 $licenseName =
new HtmlArmor( $out->parseInlineAsInterface( $extension[
'license-name'] ) );
876 } elseif ( $extensionPath !==
null && ExtensionInfo::getLicenseFileNames( $extensionPath ) ) {
877 $licenseName = $this->msg(
'version-ext-license' )->text();
879 if ( $licenseName !==
null ) {
880 $licenseLink = $this->getLinkRenderer()->makeLink(
881 $this->getPageTitle(
'License/' . $extension[
'name'] ),
884 'class' =>
'mw-version-ext-license',
894 if ( isset( $extension[
'descriptionmsg'] ) ) {
896 $descriptionMsg = $extension[
'descriptionmsg'];
898 if ( is_array( $descriptionMsg ) ) {
899 $descriptionMsgKey = array_shift( $descriptionMsg );
900 $descriptionMsg = array_map(
'htmlspecialchars', $descriptionMsg );
901 $description = $this->msg( $descriptionMsgKey, ...$descriptionMsg )->text();
903 $description = $this->msg( $descriptionMsg )->text();
905 } elseif ( isset( $extension[
'description'] ) ) {
907 $description = $extension[
'description'];
911 $description = $out->parseInlineAsInterface( $description );
914 $authors = $extension[
'author'] ?? [];
916 $authors = $this->listAuthors( $authors, $extension[
'name'], $extensionPath );
920 'class' =>
'mw-version-ext',
928 $html .=
Html::rawElement(
'td', [
'class' =>
'mw-version-ext-description' ], $description );
929 $html .=
Html::rawElement(
'td', [
'class' =>
'mw-version-ext-authors' ], $authors );
941 private function getHooks() {
942 if ( $this->getConfig()->
get( MainConfigNames::SpecialVersionShowHooks ) &&
943 $this->getConfig()->
get( MainConfigNames::Hooks )
945 $myHooks = $this->getConfig()->get( MainConfigNames::Hooks );
949 $ret[] =
'== {{int:version-hooks}} ==';
950 $ret[] =
Html::openElement(
'table', [
'class' =>
'wikitable',
'id' =>
'sv-hooks' ] );
952 $ret[] =
Html::element(
'th', [], $this->msg(
'version-hook-name' )->text() );
953 $ret[] =
Html::element(
'th', [], $this->msg(
'version-hook-subscribedby' )->text() );
956 foreach ( $myHooks as $hook => $hooks ) {
960 $ret[] =
Html::element(
'td', [], $this->listToText( $hooks ) );
966 return implode(
"\n", $ret );
972 private function openExtType(
string $text =
null,
string $name =
null ) {
975 $opt = [
'colspan' => 5 ];
976 if ( $this->firstExtOpened ) {
982 $this->firstExtOpened =
true;
985 $opt[
'id'] =
"sv-$name";
988 if ( $text !==
null ) {
994 $firstHeadingMsg = ( $name ===
'credits-skin' )
995 ?
'version-skin-colheader-name'
996 :
'version-ext-colheader-name';
998 $out .=
Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
999 $this->msg( $firstHeadingMsg )->text() );
1000 $out .=
Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
1001 $this->msg(
'version-ext-colheader-version' )->text() );
1002 $out .=
Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
1003 $this->msg(
'version-ext-colheader-license' )->text() );
1004 $out .=
Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
1005 $this->msg(
'version-ext-colheader-description' )->text() );
1006 $out .=
Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
1007 $this->msg(
'version-ext-colheader-credits' )->text() );
1018 private function IPInfo() {
1019 $ip = str_replace(
'--',
' - ', htmlspecialchars( $this->
getRequest()->getIP() ) );
1021 return "<!-- visited from $ip -->\n<span style='display:none'>visited from $ip</span>";
1046 $linkRenderer = $this->getLinkRenderer();
1049 $authors = (array)$authors;
1054 if ( count( $authors ) === 1 && $authors[0] ===
'...' ) {
1057 if ( $extName && ExtensionInfo::getAuthorsFileName( $extDir ) ) {
1058 return $linkRenderer->makeLink(
1059 $this->getPageTitle(
"Credits/$extName" ),
1060 $this->msg(
'version-poweredby-various' )->text()
1063 return $this->msg(
'version-poweredby-various' )->escaped();
1069 foreach ( $authors as $item ) {
1070 if ( $item ==
'...' ) {
1073 if ( $extName && ExtensionInfo::getAuthorsFileName( $extDir ) ) {
1074 $text = $linkRenderer->makeLink(
1075 $this->getPageTitle(
"Credits/$extName" ),
1076 $this->msg(
'version-poweredby-others' )->text()
1079 $text = $this->msg(
'version-poweredby-others' )->escaped();
1082 } elseif ( str_ends_with( $item,
' ...]' ) ) {
1084 $list[] = $this->getOutput()->parseInlineAsInterface(
1085 substr( $item, 0, -4 ) . $this->msg(
'version-poweredby-others' )->text() .
"]"
1088 $list[] = $this->getOutput()->parseInlineAsInterface( $item );
1092 if ( $extName && !$hasOthers && ExtensionInfo::getAuthorsFileName( $extDir ) ) {
1093 $list[] = $linkRenderer->makeLink(
1094 $this->getPageTitle(
"Credits/$extName" ),
1095 $this->msg(
'version-poweredby-others' )->text()
1099 return $this->listToText( $list,
false );
1109 private function listToText( array $list,
bool $sort =
true ): string {
1117 return $this->getLanguage()
1118 ->listToText( array_map( [ __CLASS__,
'arrayToString' ], $list ) );
1130 if ( is_array( $list ) && count( $list ) == 1 ) {
1133 if ( $list instanceof Closure ) {
1136 } elseif ( is_object( $list ) ) {
1137 return wfMessage(
'parentheses' )->params( get_class( $list ) )->escaped();
1138 } elseif ( !is_array( $list ) ) {
1141 if ( is_object( $list[0] ) ) {
1142 $class = get_class( $list[0] );
1147 return wfMessage(
'parentheses' )->params(
"$class, {$list[1]}" )->escaped();
1156 return (
new GitInfo( $dir ) )->getHeadSHA1();
1164 return (
new GitInfo( $dir ) )->getCurrentBranch();
1172 $config = $this->getConfig();
1173 $scriptPath = $config->get( MainConfigNames::ScriptPath ) ?:
'/';
1176 'version-entrypoints-articlepath' => $config->get( MainConfigNames::ArticlePath ),
1177 'version-entrypoints-scriptpath' => $scriptPath,
1178 'version-entrypoints-index-php' =>
wfScript(
'index' ),
1179 'version-entrypoints-api-php' =>
wfScript(
'api' ),
1180 'version-entrypoints-rest-php' =>
wfScript(
'rest' ),
1183 $language = $this->getLanguage();
1185 'dir' => $language->getDir(),
1186 'lang' => $language->getHtmlCode()
1190 [
'id' =>
'mw-version-entrypoints' ],
1191 $this->msg(
'version-entrypoints' )->text()
1195 'class' =>
'wikitable plainlinks',
1196 'id' =>
'mw-version-entrypoints-table',
1205 $this->msg(
'version-entrypoints-header-entrypoint' )->text()
1210 $this->msg(
'version-entrypoints-header-url' )->text()
1214 foreach ( $entryPoints as $message => $value ) {
const MW_VERSION
The running version of MediaWiki.
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.
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
if(!defined( 'MEDIAWIKI')) if(ini_get( 'mbstring.func_overload')) if(!defined( 'MW_ENTRY_POINT')) global $IP
Environment checks.
if(!defined( 'MW_NO_SESSION') &&! $wgCommandLineMode) $wgLang
if(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.
Reads an installed.json file and provides accessors to get what is installed.
The Registry loads JSON files, and uses a Processor to extract information from them.
getAllThings()
Get credits information about all installed extensions and skins.
static runner()
Get a HookRunner instance for calling hooks using the new interfaces.
Marks HTML that shouldn't be escaped.
static element( $element, $attribs=[], $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
static openElement( $element, $attribs=[])
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
static closeElement( $element)
Returns "</$element>".
static getLocalInstance( $ts=false)
Get a timestamp instance in the server local timezone ($wgLocaltimezone)
A class containing constants representing the names of configuration variables.
static listParam(array $list, $type='text')
static getInstance( $id)
Get a cached instance of the specified type of cache object.
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
static escapeIdForAttribute( $id, $mode=self::ID_PRIMARY)
Given a section name or other user-generated or otherwise unsafe string, escapes it to be a valid HTM...
Parent class for all special pages.
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.
static getGitHeadSha1( $dir)
getParserFunctionHooks()
Obtains a list of installed parser function hooks and the associated H2 header.
getExternalLibraries(array $credits)
Generate an HTML table for external libraries that are installed.
getEntryPointInfo()
Get the list of entry points and their URLs.
static getCredits(ExtensionRegistry $reg, Config $conf)
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.
string $coreId
The current rev id/SHA hash of MediaWiki core.
static getExtensionTypes()
Returns an array with the base extension types.
__construct(Parser $parser, UrlUtils $urlUtils)
getCreditsForExtension( $type, array $extension)
Creates and formats a version line for a single extension.
getParserTags()
Obtains a list of installed parser tags and the associated H2 header.
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 folks" text.
static getGitCurrentBranch( $dir)
static string[] false $extensionTypes
Lazy initialized key/value with message content.
static arrayToString( $list)
Convert an array or object to a string for display.
getExtensionCategory( $type, ?string $text, array $creditsGroup)
Creates and returns the HTML for a single extension category.
static closeElement( $element)
Shortcut to close an XML element.
static openElement( $element, $attribs=null)
This opens an XML element.
static element( $element, $attribs=null, $contents='', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
Interface for configuration instances.
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.
if(!is_readable( $file)) $ext
if(!isset( $args[0])) $lang