From: robin Date: Thu, 7 Jun 2012 15:25:38 +0000 (+0200) Subject: Userlogin: Do not add a language link if it's the currently used language X-Git-Tag: 1.31.0-rc.0~23364^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=5ce5b0e44d7c4ddf1dd4bdfab145cf4ff221179f;p=lhc%2Fweb%2Fwiklou.git Userlogin: Do not add a language link if it's the currently used language (Just display the language name without a link) Change-Id: I604d2905d73faf5b2242fdbf943262ae22e58a2c --- diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 3837e2724b..ded2721223 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -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';