$software = array();
$software['[https://www.mediawiki.org/ MediaWiki]'] = self::getVersionLinked();
$phpKey = wfIsHHVM() ? '[http://hhvm.com/ HHVM]' :
- '[http://www.php.net/ PHP]';
+ '[https://php.net/ PHP]';
$software[$phpKey] = PHP_VERSION . " (" . PHP_SAPI . ")";
$software[$dbr->getSoftwareLink()] = $dbr->getServerInfo();
}
/**
- * @return string wgVersion + a link to subversion revision of svn BASE
+ * @return string Global wgVersion + a link to subversion revision of svn BASE
*/
private static function getVersionLinkedSvn() {
global $IP;
/**
* @since 1.22 Returns the HEAD date in addition to the sha1 and link
- * @return bool|string wgVersion + HEAD sha1 stripped to the first 7 chars
+ * @return bool|string Global wgVersion + HEAD sha1 stripped to the first 7 chars
* with link and date, or false on failure
*/
private static function getVersionLinkedGit() {
function getExtensionCredits() {
global $wgExtensionCredits;
- if ( !count( $wgExtensionCredits ) ) {
+ if (
+ count( $wgExtensionCredits ) === 0 ||
+ // Skins are displayed separately, see getSkinCredits()
+ ( count( $wgExtensionCredits ) === 1 && isset( $wgExtensionCredits['skin'] ) )
+ ) {
return '';
}
* @return string Wikitext
*/
function getSkinCredits() {
+ global $wgExtensionCredits;
+ if ( !isset( $wgExtensionCredits['skin'] ) || count( $wgExtensionCredits['skin'] ) === 0 ) {
+ return '';
+ }
+
$out = Xml::element(
'h2',
array( 'id' => 'mw-version-skin' ),
);
array_walk( $tags, function ( &$value ) {
- $value = '<' . htmlentities( $value ) . '>';
+ $value = '<' . htmlspecialchars( $value ) . '>';
} );
$out .= $this->listToText( $tags );
} else {
if ( isset( $extension['path'] ) ) {
global $IP;
+ $extensionPath = dirname( $extension['path'] );
if ( $this->coreId == '' ) {
wfDebug( 'Looking up core head id' );
$coreHeadSHA1 = self::getGitHeadSha1( $IP );
if ( !$vcsVersion ) {
wfDebug( "Getting VCS info for extension $extensionName" );
- $extensionPath = dirname( $extension['path'] );
$gitInfo = new GitInfo( $extensionPath );
$vcsVersion = $gitInfo->getHeadSHA1();
if ( $vcsVersion !== false ) {