Userlogin: Do not add a language link if it's the currently used language
authorrobin <robinp.1273@gmail.com>
Thu, 7 Jun 2012 15:25:38 +0000 (17:25 +0200)
committerrobin <robinp.1273@gmail.com>
Thu, 7 Jun 2012 15:29:41 +0000 (17:29 +0200)
(Just display the language name without a link)

Change-Id: I604d2905d73faf5b2242fdbf943262ae22e58a2c

includes/specials/SpecialUserlogin.php

index 3837e27..ded2721 100644 (file)
@@ -1261,6 +1261,10 @@ class LoginForm extends SpecialPage {
         * @return string
         */
        function makeLanguageSelectorLink( $text, $lang ) {
+               if( $this->getLanguage()->getCode() == $lang ) {
+                       // no link for currently used language
+                       return htmlspecialchars( $text );
+               }
                $attr = array( 'uselang' => $lang );
                if( $this->mType == 'signup' ) {
                        $attr['type'] = 'signup';