52 parent::__construct(
'Version' );
63 $credits = $conf->get(
'ExtensionCredits' );
65 $credits[$credit[
'type']][] = $credit;
76 $config = $this->getConfig();
77 $credits = self::getCredits( ExtensionRegistry::getInstance(), $config );
80 $this->outputHeader();
81 $out = $this->getOutput();
82 $out->allowClickjacking();
85 $parts = explode(
'/', (
string)$par );
87 if ( isset( $parts[1] ) ) {
88 $extName = str_replace(
'_',
' ', $parts[1] );
90 foreach ( $credits as $group => $extensions ) {
91 foreach ( $extensions as
$ext ) {
92 if ( isset(
$ext[
'name'] ) && (
$ext[
'name'] === $extName ) ) {
99 $out->setStatusCode( 404 );
102 $extName =
'MediaWiki';
106 switch ( strtolower( $parts[0] ) ) {
108 $out->addModuleStyles(
'mediawiki.special.version' );
110 $wikiText =
'{{int:version-credits-not-found}}';
111 if ( $extName ===
'MediaWiki' ) {
112 $wikiText = file_get_contents(
$IP .
'/CREDITS' );
114 $wikiText = str_replace(
115 [
'<!-- BEGIN CONTRIBUTOR LIST -->',
'<!-- END CONTRIBUTOR LIST -->' ],
116 [
'<div class="mw-version-credits">',
'</div>' ],
118 } elseif ( ( $extNode !==
null ) && isset( $extNode[
'path'] ) ) {
119 $file = ExtensionInfo::getAuthorsFileName( dirname( $extNode[
'path'] ) );
121 $wikiText = file_get_contents(
$file );
122 if ( substr(
$file, -4 ) ===
'.txt' ) {
123 $wikiText = Html::element(
135 $out->setPageTitle( $this->msg(
'version-credits-title', $extName ) );
136 $out->addWikiTextAsInterface( $wikiText );
140 $out->setPageTitle( $this->msg(
'version-license-title', $extName ) );
142 $licenseFound =
false;
144 if ( $extName ===
'MediaWiki' ) {
145 $out->addWikiTextAsInterface(
146 file_get_contents(
$IP .
'/COPYING' )
148 $licenseFound =
true;
149 } elseif ( ( $extNode !==
null ) && isset( $extNode[
'path'] ) ) {
150 $files = ExtensionInfo::getLicenseFileNames( dirname( $extNode[
'path'] ) );
152 if ( count( $files ) ) {
153 $licenseFound =
true;
154 foreach ( $files as
$file ) {
155 $out->addWikiTextAsInterface(
162 file_get_contents(
$file )
168 if ( !$licenseFound ) {
169 $out->addWikiTextAsInterface(
'{{int:version-license-not-found}}' );
173 $out->addModuleStyles(
'mediawiki.special.version' );
174 $out->addWikiTextAsInterface(
175 self::getMediaWikiCredits() .
176 self::softwareInformation() .
177 $this->getEntryPointInfo()
180 $this->getSkinCredits( $credits ) .
181 $this->getExtensionCredits( $credits ) .
182 $this->getExternalLibraries( $credits ) .
183 $this->getParserTags() .
184 $this->getParserFunctionHooks()
186 $out->addWikiTextAsInterface( $this->getWgHooks() );
187 $out->addHTML( $this->IPInfo() );
201 [
'id' =>
'mw-version-license' ],
206 $ret .=
'<div class="plainlinks">';
208 " . self::getCopyrightAndAuthorList() .
"\n
209 " .
'<div class="mw-version-license-info">' .
210 wfMessage(
'version-license-info' )->text() .
214 return str_replace(
"\t\t",
'', $ret ) .
"\n";
225 if ( defined(
'MEDIAWIKI_INSTALL' ) ) {
226 $othersLink =
'[https://www.mediawiki.org/wiki/Special:Version/Credits ' .
227 wfMessage(
'version-poweredby-others' )->text() .
']';
229 $othersLink =
'[[Special:Version/Credits|' .
230 wfMessage(
'version-poweredby-others' )->text() .
']]';
233 $translatorsLink =
'[https://translatewiki.net/wiki/Translating:MediaWiki/Credits ' .
234 wfMessage(
'version-poweredby-translators' )->text() .
']';
237 'Magnus Manske',
'Brion Vibber',
'Lee Daniel Crocker',
238 'Tim Starling',
'Erik Möller',
'Gabriel Wicke',
'Ævar Arnfjörð Bjarmason',
239 'Niklas Laxström',
'Domas Mituzas',
'Rob Church',
'Yuri Astrakhan',
240 'Aryeh Gregor',
'Aaron Schulz',
'Andrew Garrett',
'Raimond Spekking',
241 'Alexandre Emsenhuber',
'Siebrand Mazeland',
'Chad Horohoe',
242 'Roan Kattouw',
'Trevor Parscal',
'Bryan Tong Minh',
'Sam Reed',
243 'Victor Vasiliev',
'Rotem Liss',
'Platonides',
'Antoine Musso',
244 'Timo Tijhof',
'Daniel Kinzler',
'Jeroen De Dauw',
'Brad Jorsch',
245 'Bartosz Dziewoński',
'Ed Sanders',
'Moriel Schottlender',
246 'Kunal Mehta',
'James D. Forrester',
'Brian Wolff',
'Adam Shorland',
247 $othersLink, $translatorsLink
250 return wfMessage(
'version-poweredby-credits', MWTimestamp::getLocalInstance()->format(
'Y' ),
251 $wgLang->listToText( $authorList ) )->text();
266 '[https://www.mediawiki.org/ MediaWiki]' => self::getVersionLinked(),
267 '[https://php.net/ PHP]' => PHP_VERSION .
" (" . PHP_SAPI .
")",
268 $dbr->getSoftwareLink() =>
$dbr->getServerInfo(),
271 if ( defined(
'INTL_ICU_VERSION' ) ) {
272 $software[
'[http://site.icu-project.org/ ICU]'] = INTL_ICU_VERSION;
276 Hooks::runner()->onSoftwareInfo( $software );
289 [
'id' =>
'mw-version-software' ],
292 Xml::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-software' ] ) .
294 <th>" .
wfMessage(
'version-software-product' )->text() .
"</th>
295 <th>" .
wfMessage(
'version-software-version' )->text() .
"</th>
298 foreach ( self::getSoftwareInformation() as $name => $version ) {
300 <td>" . $name .
"</td>
301 <td dir=\"ltr\">" . $version .
"</td>
305 return $out . Xml::closeElement(
'table' );
318 $gitInfo = self::getGitHeadSha1(
$IP );
321 } elseif ( $flags ===
'nodb' ) {
322 $shortSha1 = substr( $gitInfo, 0, 7 );
325 $shortSha1 = substr( $gitInfo, 0, 7 );
327 if (
$lang !==
null ) {
328 $msg->inLanguage(
$lang );
330 $shortSha1 = $msg->params( $shortSha1 )->escaped();
345 $gitVersion = self::getVersionLinkedGit();
360 if ( Hooks::runner()->onSpecialVersionVersionUrl(
MW_VERSION, $versionUrl ) ) {
362 preg_match(
"/^(\d+\.\d+)/",
MW_VERSION, $versionParts );
363 $versionUrl =
"https://www.mediawiki.org/wiki/MediaWiki_{$versionParts[1]}";
366 return '[' . $versionUrl .
' ' .
MW_VERSION .
']';
378 $headSHA1 = $gitInfo->getHeadSHA1();
383 $shortSHA1 =
'(' . substr( $headSHA1, 0, 7 ) .
')';
385 $gitHeadUrl = $gitInfo->getHeadViewUrl();
386 if ( $gitHeadUrl !==
false ) {
387 $shortSHA1 =
"[$gitHeadUrl $shortSHA1]";
390 $gitHeadCommitDate = $gitInfo->getHeadCommitDate();
391 if ( $gitHeadCommitDate ) {
392 $shortSHA1 .= Html::element(
'br' ) .
$wgLang->timeanddate( $gitHeadCommitDate,
true );
395 return self::getMWVersionLinked() .
" $shortSHA1";
409 if ( self::$extensionTypes ===
false ) {
410 self::$extensionTypes = [
411 'specialpage' =>
wfMessage(
'version-specialpages' )->text(),
412 'editor' =>
wfMessage(
'version-editors' )->text(),
413 'parserhook' =>
wfMessage(
'version-parserhooks' )->text(),
414 'variable' =>
wfMessage(
'version-variables' )->text(),
415 'media' =>
wfMessage(
'version-mediahandlers' )->text(),
416 'antispam' =>
wfMessage(
'version-antispam' )->text(),
417 'skin' =>
wfMessage(
'version-skins' )->text(),
418 'api' =>
wfMessage(
'version-api' )->text(),
419 'other' =>
wfMessage(
'version-other' )->text(),
422 Hooks::runner()->onExtensionTypes( self::$extensionTypes );
425 return self::$extensionTypes;
438 $types = self::getExtensionTypes();
440 return $types[
$type] ?? $types[
'other'];
453 ( count( $credits ) === 1 && isset( $credits[
'skin'] ) )
458 $extensionTypes = self::getExtensionTypes();
462 [
'id' =>
'mw-version-ext' ],
463 $this->msg(
'version-extensions' )->text()
465 Xml::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-ext' ] );
468 if ( !array_key_exists(
'other', $credits ) ) {
469 $credits[
'other'] = [];
473 foreach ( $credits as
$type => $extensions ) {
474 if ( !array_key_exists(
$type, $extensionTypes ) ) {
475 $credits[
'other'] = array_merge( $credits[
'other'], $extensions );
479 $this->firstExtOpened =
false;
481 foreach ( $extensionTypes as
$type => $message ) {
483 if (
$type !==
'other' &&
$type !==
'skin' ) {
484 $out .= $this->getExtensionCategory(
$type, $message, $credits[
$type] ?? [] );
489 $out .= $this->getExtensionCategory(
'other', $extensionTypes[
'other'], $credits[
'other'] );
491 $out .= Xml::closeElement(
'table' );
503 if ( !isset( $credits[
'skin'] ) || count( $credits[
'skin'] ) === 0 ) {
509 [
'id' =>
'mw-version-skin' ],
510 $this->msg(
'version-skins' )->text()
512 Xml::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-skin' ] );
514 $this->firstExtOpened =
false;
515 $out .= $this->getExtensionCategory(
'skin',
null, $credits[
'skin'] );
517 $out .= Xml::closeElement(
'table' );
531 "$IP/vendor/composer/installed.json"
534 $extensionTypes = self::getExtensionTypes();
535 foreach ( $extensionTypes as
$type => $message ) {
536 if ( !isset( $credits[
$type] ) || $credits[
$type] === [] ) {
539 foreach ( $credits[
$type] as $extension ) {
540 if ( !isset( $extension[
'path'] ) ) {
543 $paths[] = dirname( $extension[
'path'] ) .
'/vendor/composer/installed.json';
549 foreach ( $paths as
$path ) {
550 if ( !file_exists(
$path ) ) {
556 $dependencies += $installed->getInstalledDependencies();
559 if ( $dependencies === [] ) {
563 ksort( $dependencies );
565 $out = Html::element(
567 [
'id' =>
'mw-version-libraries' ],
568 $this->msg(
'version-libraries' )->text()
570 $out .= Html::openElement(
572 [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-libraries' ]
574 $out .= Html::openElement(
'tr' )
575 . Html::element(
'th', [], $this->msg(
'version-libraries-library' )->text() )
576 . Html::element(
'th', [], $this->msg(
'version-libraries-version' )->text() )
577 . Html::element(
'th', [], $this->msg(
'version-libraries-license' )->text() )
578 . Html::element(
'th', [], $this->msg(
'version-libraries-description' )->text() )
579 . Html::element(
'th', [], $this->msg(
'version-libraries-authors' )->text() )
580 . Html::closeElement(
'tr' );
582 foreach ( $dependencies as $name => $info ) {
583 if ( !is_array( $info ) || strpos( $info[
'type'],
'mediawiki-' ) === 0 ) {
588 $authors = array_map(
function ( $arr ) {
590 if ( isset( $arr[
'homepage'] ) ) {
591 return "[{$arr['homepage']} {$arr['name']}]";
594 }, $info[
'authors'] );
595 $authors = $this->listAuthors( $authors,
false,
"$IP/vendor/$name" );
600 $out .= Html::openElement(
'tr', [
603 'id' => Sanitizer::escapeIdForAttribute(
604 "mw-version-library-$name"
610 "https://packagist.org/packages/$name", $name,
612 [
'class' =>
'mw-version-library-name' ]
615 . Html::element(
'td', [
'dir' =>
'auto' ], $info[
'version'] )
616 . Html::element(
'td', [
'dir' =>
'auto' ], $this->listToText( $info[
'licenses'] ) )
617 . Html::element(
'td', [
'lang' =>
'en',
'dir' =>
'ltr' ], $info[
'description'] )
618 . Html::rawElement(
'td', [], $authors )
619 . Html::closeElement(
'tr' );
621 $out .= Html::closeElement(
'table' );
632 $tags = MediaWikiServices::getInstance()->getParser()->getTags();
634 if ( count( $tags ) ) {
635 $out = Html::rawElement(
638 'class' =>
'mw-headline plainlinks',
639 'id' =>
'mw-version-parser-extensiontags',
642 'https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Tag_extensions',
643 $this->msg(
'version-parser-extensiontags' )->parse(),
648 array_walk( $tags,
function ( &$value ) {
650 $value = Html::element(
654 'style' =>
'white-space: nowrap;',
660 $out .= $this->listToText( $tags );
674 $fhooks = MediaWikiServices::getInstance()->getParser()->getFunctionHooks();
675 if ( count( $fhooks ) ) {
676 $out = Html::rawElement(
679 'class' =>
'mw-headline plainlinks',
680 'id' =>
'mw-version-parser-function-hooks',
683 'https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Parser_functions',
684 $this->msg(
'version-parser-function-hooks' )->parse(),
689 $out .= $this->listToText( $fhooks );
707 $config = $this->getConfig();
708 $credits = $config->get(
'ExtensionCredits' );
712 if ( $creditsGroup ) {
713 $out .= $this->openExtType( $message,
'credits-' .
$type );
715 usort( $creditsGroup, [ $this,
'compare' ] );
717 foreach ( $creditsGroup as $extension ) {
718 $out .= $this->getCreditsForExtension(
$type, $extension );
732 return $this->getLanguage()->lc( $a[
'name'] ) <=> $this->getLanguage()->lc( $b[
'name'] );
754 $out = $this->getOutput();
758 if ( isset( $extension[
'namemsg'] ) ) {
760 $extensionName = $this->msg( $extension[
'namemsg'] )->text();
761 } elseif ( isset( $extension[
'name'] ) ) {
763 $extensionName = $extension[
'name'];
765 $extensionName = $this->msg(
'version-no-ext-name' )->text();
768 if ( isset( $extension[
'url'] ) ) {
774 [
'class' =>
'mw-version-ext-name' ]
777 $extensionNameLink = htmlspecialchars( $extensionName );
783 $canonicalVersion =
'–';
784 $extensionPath =
null;
789 if ( isset( $extension[
'version'] ) ) {
790 $canonicalVersion = $out->parseInlineAsInterface( $extension[
'version'] );
793 if ( isset( $extension[
'path'] ) ) {
795 $extensionPath = dirname( $extension[
'path'] );
796 if ( $this->coreId ==
'' ) {
797 wfDebug(
'Looking up core head id' );
798 $coreHeadSHA1 = self::getGitHeadSha1(
$IP );
799 if ( $coreHeadSHA1 ) {
800 $this->coreId = $coreHeadSHA1;
804 $memcKey =
$cache->makeKey(
805 'specialversion-ext-version-text', $extension[
'path'], $this->coreId
807 list( $vcsVersion, $vcsLink, $vcsDate ) =
$cache->get( $memcKey );
809 if ( !$vcsVersion ) {
810 wfDebug(
"Getting VCS info for extension {$extension['name']}" );
811 $gitInfo =
new GitInfo( $extensionPath );
812 $vcsVersion = $gitInfo->getHeadSHA1();
813 if ( $vcsVersion !==
false ) {
814 $vcsVersion = substr( $vcsVersion, 0, 7 );
815 $vcsLink = $gitInfo->getHeadViewUrl();
816 $vcsDate = $gitInfo->getHeadCommitDate();
818 $cache->set( $memcKey, [ $vcsVersion, $vcsLink, $vcsDate ], 60 * 60 * 24 );
820 wfDebug(
"Pulled VCS info for extension {$extension['name']} from cache" );
824 $versionString = Html::rawElement(
826 [
'class' =>
'mw-version-ext-version' ],
834 $this->msg(
'version-version', $vcsVersion ),
837 [
'class' =>
'mw-version-ext-vcs-version' ]
840 $vcsVerString = Html::element(
'span',
841 [
'class' =>
'mw-version-ext-vcs-version' ],
845 $versionString .=
" {$vcsVerString}";
848 $versionString .=
' ' . Html::element(
'span', [
849 'class' =>
'mw-version-ext-vcs-timestamp',
850 'dir' => $this->getLanguage()->getDir(),
851 ], $this->getLanguage()->timeanddate( $vcsDate,
true ) );
853 $versionString = Html::rawElement(
'span',
854 [
'class' =>
'mw-version-ext-meta-version' ],
862 if ( isset( $extension[
'name'] ) ) {
864 if ( isset( $extension[
'license-name'] ) ) {
865 $licenseName =
new HtmlArmor( $out->parseInlineAsInterface( $extension[
'license-name'] ) );
866 } elseif ( ExtensionInfo::getLicenseFileNames( $extensionPath ) ) {
867 $licenseName = $this->msg(
'version-ext-license' )->text();
869 if ( $licenseName !==
null ) {
870 $licenseLink = $this->getLinkRenderer()->makeLink(
871 $this->getPageTitle(
'License/' . $extension[
'name'] ),
874 'class' =>
'mw-version-ext-license',
884 if ( isset( $extension[
'descriptionmsg'] ) ) {
886 $descriptionMsg = $extension[
'descriptionmsg'];
888 if ( is_array( $descriptionMsg ) ) {
889 $descriptionMsgKey = $descriptionMsg[0];
890 array_shift( $descriptionMsg );
891 array_map(
"htmlspecialchars", $descriptionMsg );
892 $description = $this->msg( $descriptionMsgKey, $descriptionMsg )->text();
894 $description = $this->msg( $descriptionMsg )->text();
896 } elseif ( isset( $extension[
'description'] ) ) {
898 $description = $extension[
'description'];
902 $description = $out->parseInlineAsInterface( $description );
905 $authors = $extension[
'author'] ?? [];
906 $authors = $this->listAuthors( $authors, $extension[
'name'], $extensionPath );
909 $html = Html::openElement(
'tr', [
910 'class' =>
'mw-version-ext',
911 'id' => Sanitizer::escapeIdForAttribute(
'mw-version-ext-' .
$type .
'-' . $extension[
'name'] )
915 $html .= Html::rawElement(
'td', [], $extensionNameLink );
916 $html .= Html::rawElement(
'td', [], $versionString );
917 $html .= Html::rawElement(
'td', [], $licenseLink );
918 $html .= Html::rawElement(
'td', [
'class' =>
'mw-version-ext-description' ], $description );
919 $html .= Html::rawElement(
'td', [
'class' =>
'mw-version-ext-authors' ], $authors );
921 $html .= Html::closeElement(
'tr' );
939 $ret[] =
'== {{int:version-hooks}} ==';
940 $ret[] = Html::openElement(
'table', [
'class' =>
'wikitable',
'id' =>
'sv-hooks' ] );
941 $ret[] = Html::openElement(
'tr' );
942 $ret[] = Html::element(
'th', [], $this->msg(
'version-hook-name' )->text() );
943 $ret[] = Html::element(
'th', [], $this->msg(
'version-hook-subscribedby' )->text() );
944 $ret[] = Html::closeElement(
'tr' );
946 foreach ( $myWgHooks as $hook => $hooks ) {
947 $ret[] = Html::openElement(
'tr' );
948 $ret[] = Html::element(
'td', [], $hook );
949 $ret[] = Html::element(
'td', [], $this->listToText( $hooks ) );
950 $ret[] = Html::closeElement(
'tr' );
953 $ret[] = Html::closeElement(
'table' );
955 return implode(
"\n", $ret );
964 $opt = [
'colspan' => 5 ];
965 if ( $this->firstExtOpened ) {
967 $out .= Html::rawElement(
'tr', [
'class' =>
'sv-space' ],
968 Html::element(
'td', $opt )
971 $this->firstExtOpened =
true;
974 $opt[
'id'] =
"sv-$name";
977 if ( $text !==
null ) {
978 $out .= Html::rawElement(
'tr', [],
979 Html::element(
'th', $opt, $text )
983 $firstHeadingMsg = ( $name ===
'credits-skin' )
984 ?
'version-skin-colheader-name'
985 :
'version-ext-colheader-name';
986 $out .= Html::openElement(
'tr' );
987 $out .= Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
988 $this->msg( $firstHeadingMsg )->text() );
989 $out .= Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
990 $this->msg(
'version-ext-colheader-version' )->text() );
991 $out .= Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
992 $this->msg(
'version-ext-colheader-license' )->text() );
993 $out .= Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
994 $this->msg(
'version-ext-colheader-description' )->text() );
995 $out .= Html::element(
'th', [
'class' =>
'mw-version-ext-col-label' ],
996 $this->msg(
'version-ext-colheader-credits' )->text() );
997 $out .= Html::closeElement(
'tr' );
1008 $ip = str_replace(
'--',
' - ', htmlspecialchars( $this->getRequest()->getIP() ) );
1010 return "<!-- visited from $ip -->\n<span style='display:none'>visited from $ip</span>";
1036 $linkRenderer = $this->getLinkRenderer();
1039 $authors = (array)$authors;
1044 if ( count( $authors ) === 1 && $authors[0] ===
'...' ) {
1047 if ( $extName && ExtensionInfo::getAuthorsFileName( $extDir ) ) {
1048 return $linkRenderer->makeLink(
1049 $this->getPageTitle(
"Credits/$extName" ),
1050 $this->msg(
'version-poweredby-various' )->text()
1053 return $this->msg(
'version-poweredby-various' )->escaped();
1059 foreach ( $authors as $item ) {
1060 if ( $item ==
'...' ) {
1063 if ( $extName && ExtensionInfo::getAuthorsFileName( $extDir ) ) {
1064 $text = $linkRenderer->makeLink(
1065 $this->getPageTitle(
"Credits/$extName" ),
1066 $this->msg(
'version-poweredby-others' )->text()
1069 $text = $this->msg(
'version-poweredby-others' )->escaped();
1072 } elseif ( substr( $item, -5 ) ==
' ...]' ) {
1074 $list[] = $this->getOutput()->parseInlineAsInterface(
1075 substr( $item, 0, -4 ) . $this->msg(
'version-poweredby-others' )->text() .
"]"
1078 $list[] = $this->getOutput()->parseInlineAsInterface( $item );
1082 if ( $extName && !$hasOthers && ExtensionInfo::getAuthorsFileName( $extDir ) ) {
1083 $list[] = $text = $linkRenderer->makeLink(
1084 $this->getPageTitle(
"Credits/$extName" ),
1085 $this->msg(
'version-poweredby-others' )->text()
1089 return $this->listToText( $list,
false );
1106 return ExtensionInfo::getAuthorsFileName( $extDir );
1123 $licenses = ExtensionInfo::getLicenseFileNames( $extDir );
1124 if ( count( $licenses ) === 0 ) {
1127 return $licenses[0];
1139 if ( !count( $list ) ) {
1146 return $this->getLanguage()
1147 ->listToText( array_map( [ __CLASS__,
'arrayToString' ], $list ) );
1159 if ( is_array( $list ) && count( $list ) == 1 ) {
1162 if ( $list instanceof Closure ) {
1165 } elseif ( is_object( $list ) ) {
1166 $class =
wfMessage(
'parentheses' )->params( get_class( $list ) )->escaped();
1169 } elseif ( !is_array( $list ) ) {
1172 if ( is_object( $list[0] ) ) {
1173 $class = get_class( $list[0] );
1178 return wfMessage(
'parentheses' )->params(
"$class, {$list[1]}" )->escaped();
1189 return $repo->getHeadSHA1();
1198 return $repo->getCurrentBranch();
1206 $config = $this->getConfig();
1207 $scriptPath = $config->get(
'ScriptPath' ) ?:
'/';
1210 'version-entrypoints-articlepath' => $config->get(
'ArticlePath' ),
1211 'version-entrypoints-scriptpath' => $scriptPath,
1212 'version-entrypoints-index-php' =>
wfScript(
'index' ),
1213 'version-entrypoints-api-php' =>
wfScript(
'api' ),
1214 'version-entrypoints-rest-php' =>
wfScript(
'rest' ),
1217 $language = $this->getLanguage();
1219 'dir' => $language->getDir(),
1220 'lang' => $language->getHtmlCode()
1222 $out = Html::element(
1224 [
'id' =>
'mw-version-entrypoints' ],
1225 $this->msg(
'version-entrypoints' )->text()
1227 Html::openElement(
'table',
1229 'class' =>
'wikitable plainlinks',
1230 'id' =>
'mw-version-entrypoints-table',
1235 Html::openElement(
'tr' ) .
1239 $this->msg(
'version-entrypoints-header-entrypoint' )->text()
1244 $this->msg(
'version-entrypoints-header-url' )->text()
1246 Html::closeElement(
'tr' );
1248 foreach ( $entryPoints as $message => $value ) {
1250 $out .= Html::openElement(
'tr' ) .
1253 Html::rawElement(
'td', [], $this->msg( $message )->plain() ) .
1254 Html::rawElement(
'td', [], Html::rawElement(
'code', [],
"[$url $value]" ) ) .
1255 Html::closeElement(
'tr' );
1258 $out .= Html::closeElement(
'table' );
$wgHooks
Global list of hooks.
$wgSpecialVersionShowHooks
Show the contents of $wgHooks in Special:Version.
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.
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...
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that $function is deprecated.
Reads an installed.json file and provides accessors to get what is installed.
getAllThings()
Get credits information about all installed extensions and skins.
Marks HTML that shouldn't be escaped.
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
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.
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.
getExternalLibraries(array $credits)
Generate an HTML table for external libraries that are installed.
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.
static getCredits(ExtensionRegistry $reg, Config $conf)
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
getExtensionCategory( $type, $message, array $creditsGroup)
Creates and returns the HTML for a single extension category.
getExtensionCredits(array $credits)
Generate wikitext showing the name, URL, author and description of each extension.
listAuthors( $authors, $extName, $extDir)
Return a formatted unsorted list of authors.
static getSoftwareInformation()
string $coreId
The current rev id/SHA hash of MediaWiki core.
static softwareInformation()
Returns HTML showing the third party software versions (apache, php, mysql).
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 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.
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 getMWVersionLinked()
static arrayToString( $list)
Convert an array or object to a string for display.
getSkinCredits(array $credits)
Generate wikitext showing the name, URL, author and description of each skin.
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