Fix fatal error in eval.php
[lhc/web/wiklou.git] / includes / SpecialVersion.php
index 0b63393..501ba9a 100644 (file)
@@ -52,7 +52,7 @@ class SpecialVersion {
                $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.
 
@@ -96,12 +96,13 @@ class SpecialVersion {
                        '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] ) ) {
@@ -142,16 +143,20 @@ class SpecialVersion {
                        $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) {
@@ -182,7 +187,7 @@ class SpecialVersion {
                        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)
@@ -200,13 +205,13 @@ class SpecialVersion {
 
                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;
        }
 
@@ -311,4 +316,4 @@ class SpecialVersion {
 }
 
 /**#@-*/
-?>
+