Adding support for domains in SpecialPasswordReset.php.
[lhc/web/wiklou.git] / includes / specials / SpecialVersion.php
index f58d366..4651fe6 100644 (file)
@@ -49,14 +49,13 @@ class SpecialVersion extends SpecialPage {
         * main()
         */
        public function execute( $par ) {
-               global $wgOut, $wgSpecialVersionShowHooks, $wgContLang, $wgRequest;
+               global $wgSpecialVersionShowHooks;
 
                $this->setHeaders();
                $this->outputHeader();
-               $wgOut->allowClickjacking();
+               $out = $this->getOutput();
+               $out->allowClickjacking();
 
-               $wgOut->addHTML( Xml::openElement( 'div',
-                       array( 'dir' => $wgContLang->getDir() ) ) );
                $text =
                        $this->getMediaWikiCredits() .
                        $this->softwareInformation() .
@@ -65,11 +64,10 @@ class SpecialVersion extends SpecialPage {
                        $text .= $this->getWgHooks();
                }
 
-               $wgOut->addWikiText( $text );
-               $wgOut->addHTML( $this->IPInfo() );
-               $wgOut->addHTML( '</div>' );
+               $out->addWikiText( $text );
+               $out->addHTML( $this->IPInfo() );
 
-               if ( $wgRequest->getVal( 'easteregg' ) ) {
+               if ( $this->getRequest()->getVal( 'easteregg' ) ) {
                        if ( $this->showEasterEgg() ) {
                                // TODO: put something interesting here
                        }
@@ -109,7 +107,7 @@ class SpecialVersion extends SpecialPage {
                        'Aryeh Gregor', 'Aaron Schulz', 'Andrew Garrett', 'Raimond Spekking',
                        'Alexandre Emsenhuber', 'Siebrand Mazeland', 'Chad Horohoe',
                        'Roan Kattouw', 'Trevor Parscal', 'Bryan Tong Minh', 'Sam Reed',
-                       'Victor Vasiliev', 'Rotem Liss', 'Platonides',
+                       'Victor Vasiliev', 'Rotem Liss', 'Platonides', 'Ashar Voultoiz',
                        wfMsg( 'version-poweredby-others' )
                );
 
@@ -146,7 +144,7 @@ class SpecialVersion extends SpecialPage {
                foreach( $software as $name => $version ) {
                        $out .= "<tr>
                                        <td>" . $name . "</td>
-                                       <td>" . $version . "</td>
+                                       <td class=\"ltr\">" . $version . "</td>
                                </tr>\n";
                }
 
@@ -233,6 +231,7 @@ class SpecialVersion extends SpecialPage {
                                'media' => wfMsg( 'version-mediahandlers' ),
                                'antispam' => wfMsg( 'version-antispam' ),
                                'skin' => wfMsg( 'version-skins' ),
+                               'api' => wfMsg( 'version-api' ),
                                'other' => wfMsg( 'version-other' ),
                        );
 
@@ -359,11 +358,10 @@ class SpecialVersion extends SpecialPage {
         * Callback to sort extensions by type.
         */
        function compare( $a, $b ) {
-               global $wgLang;
                if( $a['name'] === $b['name'] ) {
                        return 0;
                } else {
-                       return $wgLang->lc( $a['name'] ) > $wgLang->lc( $b['name'] )
+                       return $this->getLang()->lc( $a['name'] ) > $this->getLang()->lc( $b['name'] )
                                ? 1
                                : -1;
                }
@@ -504,7 +502,7 @@ class SpecialVersion extends SpecialPage {
         * @return String: HTML fragment
         */
        private function IPInfo() {
-               $ip =  str_replace( '--', ' - ', htmlspecialchars( wfGetIP() ) );
+               $ip =  str_replace( '--', ' - ', htmlspecialchars( $this->getRequest()->getIP() ) );
                return "<!-- visited from $ip -->\n" .
                        "<span style='display:none'>visited from $ip</span>";
        }
@@ -544,11 +542,10 @@ class SpecialVersion extends SpecialPage {
                } elseif ( $cnt == 0 ) {
                        return '';
                } else {
-                       global $wgLang;
                        if ( $sort ) {
                                sort( $list );
                        }
-                       return $wgLang->listToText( array_map( array( __CLASS__, 'arrayToString' ), $list ) );
+                       return $this->getLang()->listToText( array_map( array( __CLASS__, 'arrayToString' ), $list ) );
                }
        }