);
function __construct(){
- parent::__construct( 'Version' );
+ parent::__construct( 'Version' );
}
/**
$ret .= '<div dir="ltr">';
$ret .= "__NOTOC__
This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''',
- copyright © 2001-2009 Magnus Manske, Brion Vibber, Lee Daniel Crocker,
+ copyright © 2001-2010 Magnus Manske, Brion Vibber, Lee Daniel Crocker,
Tim Starling, Erik Möller, Gabriel Wicke, Ævar Arnfjörð Bjarmason,
Niklas Laxström, Domas Mituzas, Rob Church, Yuri Astrakhan, Aryeh Gregor,
Aaron Schulz, Andrew Garrett, Raimond Spekking, Alexandre Emsenhuber,
*
* @return mixed
*/
- public static function getVersion( $flags = '' ) {
+ public static function getVersion( $flags = '' ) {
global $wgVersion, $IP;
wfProfileIn( __METHOD__ );
} elseif( $flags === 'nodb' ) {
$version = "$wgVersion (r{$info['checkout-rev']})";
} else {
- $version = $wgVersion .
+ $version = $wgVersion . ' ' .
wfMsg(
'version-svn-revision',
isset( $info['directory-rev'] ) ? $info['directory-rev'] : '',
foreach ( $extensionTypes as $type => $text ) {
if ( isset ( $wgExtensionCredits[$type] ) && count ( $wgExtensionCredits[$type] ) ) {
- $out .= $this->openExtType( $text );
+ $out .= $this->openExtType( $text, 'credits-' . $type );
usort( $wgExtensionCredits[$type], array( $this, 'compare' ) );
}
if ( count( $wgExtensionFunctions ) ) {
- $out .= $this->openExtType( wfMsg( 'version-extension-functions' ) );
+ $out .= $this->openExtType( wfMsg( 'version-extension-functions' ), 'extension-functions' );
$out .= '<tr><td colspan="4">' . $this->listToText( $wgExtensionFunctions ) . "</td></tr>\n";
}
if ( $cnt = count( $tags = $wgParser->getTags() ) ) {
for ( $i = 0; $i < $cnt; ++$i )
$tags[$i] = "<{$tags[$i]}>";
- $out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ) );
+ $out .= $this->openExtType( wfMsg( 'version-parser-extensiontags' ), 'parser-tags' );
$out .= '<tr><td colspan="4">' . $this->listToText( $tags ). "</td></tr>\n";
}
if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) {
- $out .= $this->openExtType( wfMsg( 'version-parser-function-hooks' ) );
+ $out .= $this->openExtType( wfMsg( 'version-parser-function-hooks' ), 'parser-function-hooks' );
$out .= '<tr><td colspan="4">' . $this->listToText( $fhooks ) . "</td></tr>\n";
}
if ( count( $wgSkinExtensionFunctions ) ) {
- $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ) );
+ $out .= $this->openExtType( wfMsg( 'version-skin-extension-functions' ), 'skin-extension-functions' );
$out .= '<tr><td colspan="4">' . $this->listToText( $wgSkinExtensionFunctions ) . "</td></tr>\n";
}
$out .= Xml::closeElement( 'table' );
}
$author = isset ( $extension['author'] ) ? $extension['author'] : array();
$extDescAuthor = "<td>$description</td>
- <td>" . $this->listToText( (array)$author ) . "</td>
+ <td>" . $this->listToText( (array)$author, false ) . "</td>
</tr>\n";
return $extNameVer . $extDescAuthor;
}
return '';
}
- private function openExtType($text, $name = null) {
+ private function openExtType( $text, $name = null ) {
$opt = array( 'colspan' => 4 );
$out = '';
- if(!$this->firstExtOpened) {
+ if( !$this->firstExtOpened ) {
// Insert a spacing line
$out .= '<tr class="sv-space">' . Xml::element( 'td', $opt ) . "</tr>\n";
}
$this->firstExtOpened = false;
- if($name) { $opt['id'] = "sv-$name"; }
+ if( $name )
+ $opt['id'] = "sv-$name";
- $out .= "<tr>" . Xml::element( 'th', $opt, $text) . "</tr>\n";
+ $out .= "<tr>" . Xml::element( 'th', $opt, $text ) . "</tr>\n";
return $out;
}
/**
* @param array $list
+ * @param bool $sort
* @return string
*/
- function listToText( $list ) {
+ function listToText( $list, $sort = true ) {
$cnt = count( $list );
if ( $cnt == 1 ) {
return '';
} else {
global $wgLang;
- sort( $list );
+ if ( $sort ) {
+ sort( $list );
+ }
return $wgLang->listToText( array_map( array( __CLASS__, 'arrayToString' ), $list ) );
}
}