$this->getEntryPointInfo()
);
$out->addHtml(
+ $this->getSkinCredits() .
$this->getExtensionCredits() .
$this->getParserTags() .
$this->getParserFunctionHooks()
// wikimarkup can be used.
$software = array();
$software['[https://www.mediawiki.org/ MediaWiki]'] = self::getVersionLinked();
- $software['[http://www.php.net/ PHP]'] = phpversion() . " (" . PHP_SAPI . ")";
+ $phpKey = wfIsHHVM() ? '[http://hhvm.com/ HHVM]' :
+ '[http://www.php.net/ PHP]';
+ $software[$phpKey] = PHP_VERSION . " (" . PHP_SAPI . ")";
$software[$dbr->getSoftwareLink()] = $dbr->getServerInfo();
// Allow a hook to add/remove items.
* Returns an array with the base extension types.
* Type is stored as array key, the message as array value.
*
- * TODO: ideally this would return all extension types, including
- * those added by SpecialVersionExtensionTypes. This is not possible
- * since this hook is passing along $this though.
+ * TODO: ideally this would return all extension types.
*
* @since 1.17
*
}
/**
- * Generate wikitext showing extensions name, URL, author and description.
+ * Generate wikitext showing the name, URL, author and description of each extension.
*
* @return string Wikitext
*/
$extensionTypes = self::getExtensionTypes();
- wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ), '1.17' );
-
$out = Xml::element(
'h2',
array( 'id' => 'mw-version-ext' ),
}
}
+ $this->firstExtOpened = false;
// Loop through the extension categories to display their extensions in the list.
foreach ( $extensionTypes as $type => $message ) {
- if ( $type != 'other' ) {
+ // Skins have a separate section
+ if ( $type !== 'other' && $type !== 'skin' ) {
$out .= $this->getExtensionCategory( $type, $message );
}
}
return $out;
}
+ /**
+ * Generate wikitext showing the name, URL, author and description of each skin.
+ *
+ * @return string Wikitext
+ */
+ function getSkinCredits() {
+ $out = Xml::element(
+ 'h2',
+ array( 'id' => 'mw-version-skin' ),
+ $this->msg( 'version-skins' )->text()
+ ) .
+ Xml::openElement( 'table', array( 'class' => 'wikitable plainlinks', 'id' => 'sv-skin' ) );
+
+ $this->firstExtOpened = false;
+ $out .= $this->getExtensionCategory( 'skin', null );
+
+ $out .= Xml::closeElement( 'table' );
+
+ return $out;
+ }
+
/**
* Obtains a list of installed parser tags and the associated H2 header
*
// We must obtain the information for all the bits and pieces!
// ... such as extension names and links
- $extensionName = isset( $extension['name'] ) ? $extension['name'] : '[no name]';
+ if ( isset( $extension['namemsg'] ) ) {
+ // Localized name of extension
+ $extensionName = $this->msg( $extension['namemsg'] )->text();
+ } elseif ( isset( $extension['name'] ) ) {
+ // Non localized version
+ $extensionName = $extension['name'];
+ } else {
+ $extensionName = $this->msg( 'version-no-ext-name' )->text();
+ }
+
if ( isset( $extension['url'] ) ) {
$extensionNameLink = Linker::makeExternalLink(
$extension['url'],
}
}
- private function openExtType( $text, $name = null ) {
+ private function openExtType( $text = null, $name = null ) {
$out = '';
$opt = array( 'colspan' => 5 );
$opt['id'] = "sv-$name";
}
- $out .= Html::rawElement( 'tr', array(),
- Html::element( 'th', $opt, $text )
- );
+ if ( $text !== null ) {
+ $out .= Html::rawElement( 'tr', array(),
+ Html::element( 'th', $opt, $text )
+ );
+ }
+ $firstHeadingMsg = ( $name === 'credits-skin' )
+ ? 'version-skin-colheader-name'
+ : 'version-ext-colheader-name';
$out .= Html::openElement( 'tr' );
$out .= Html::element( 'th', array( 'class' => 'mw-version-ext-col-label' ),
- $this->msg( 'version-ext-colheader-name' )->text() );
+ $this->msg( $firstHeadingMsg )->text() );
$out .= Html::element( 'th', array( 'class' => 'mw-version-ext-col-label' ),
$this->msg( 'version-ext-colheader-version' )->text() );
$out .= Html::element( 'th', array( 'class' => 'mw-version-ext-col-label' ),