$ret =
"__NOTOC__
This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''',
- copyright (C) 2001-2007 Magnus Manske, Brion Vibber, Lee Daniel Crocker,
+ copyright (C) 2001-2008 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 and others.
'specialpage' => 'Special pages',
'parserhook' => 'Parser hooks',
'variable' => 'Variables',
+ 'media' => 'Media handlers',
'other' => 'Other',
);
wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ) );
$out = "<h2>Extensions</h2>\n";
- $out .= wfOpenElement('table', array('id' => 'sv-ext') );
+ $out .= Xml::openElement('table', array('id' => 'sv-ext') );
foreach ( $extensionTypes as $type => $text ) {
if ( isset ( $wgExtensionCredits[$type] ) && count ( $wgExtensionCredits[$type] ) ) {
$out .= $this->openExtType('Skin extension functions');
$out .= '<tr><td colspan="3">' . $this->listToText( $wgSkinExtensionFunction ) . "</td></tr>\n";
}
- $out .= wfCloseElement( 'table' );
+ $out .= Xml::closeElement( 'table' );
return $out;
}
/** Callback to sort extensions by type */
function compare( $a, $b ) {
- if ( $a['name'] === $b['name'] )
+ global $wgLang;
+ if( $a['name'] === $b['name'] ) {
return 0;
- else
- return Language::lc( $a['name'] ) > Language::lc( $b['name'] ) ? 1 : -1;
+ } else {
+ return $wgLang->lc( $a['name'] ) > $wgLang->lc( $b['name'] )
+ ? 1
+ : -1;
+ }
}
function formatCredits( $name, $version = null, $author = null, $url = null, $description = null) {
ksort( $myWgHooks );
$ret = "<h2>Hooks</h2>\n"
- . wfOpenElement('table', array('id' => 'sv-hooks') )
+ . Xml::openElement('table', array('id' => 'sv-hooks') )
. "<tr><th>Hook name</th><th>Subscribed by</th></tr>\n";
foreach ($myWgHooks as $hook => $hooks)
if(!$this->firstExtOpened) {
// Insert a spacing line
- $out .= '<tr class="sv-space">' . wfElement( 'td', $opt ) . "</tr>\n";
+ $out .= '<tr class="sv-space">' . Xml::element( 'td', $opt ) . "</tr>\n";
}
$this->firstExtOpened = false;
if($name) { $opt['id'] = "sv-$name"; }
- $out .= "<tr>" . wfElement( 'th', $opt, $text) . "</tr>\n";
+ $out .= "<tr>" . Xml::element( 'th', $opt, $text) . "</tr>\n";
return $out;
}
* @return mixed
*/
function arrayToString( $list ) {
- if ( ! is_array( $list ) ) {
+ if( is_object( $list ) ) {
+ $class = get_class( $list );
+ return "($class)";
+ } elseif ( ! is_array( $list ) ) {
return $list;
} else {
$class = get_class( $list[0] );
return false;
}
- $xml = simplexml_load_file( $entries, "SimpleXMLElement", LIBXML_NOWARNING );
+ // SimpleXml whines about the xmlns...
+ wfSuppressWarnings();
+ $xml = simplexml_load_file( $entries );
+ wfRestoreWarnings();
if( $xml ) {
foreach( $xml->entry as $entry ) {
}
/**#@-*/
-?>
+