dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Remove adittional type hinting stuff because PHP will die if its there >_>"
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialUserlogin.php
diff --git
a/includes/specials/SpecialUserlogin.php
b/includes/specials/SpecialUserlogin.php
index
f6df4d5
..
7d91096
100644
(file)
--- a/
includes/specials/SpecialUserlogin.php
+++ b/
includes/specials/SpecialUserlogin.php
@@
-125,11
+125,7
@@
class LoginForm extends SpecialPage {
}
if( !$wgAuth->validDomain( $this->mDomain ) ) {
}
if( !$wgAuth->validDomain( $this->mDomain ) ) {
- if ( isset( $_SESSION['wsDomain'] ) ) {
- $this->mDomain = $_SESSION['wsDomain'];
- } else {
- $this->mDomain = 'invaliddomain';
- }
+ $this->mDomain = $wgAuth->getDomain();
}
$wgAuth->setDomain( $this->mDomain );
}
$wgAuth->setDomain( $this->mDomain );
@@
-1152,7
+1148,7
@@
class LoginForm extends SpecialPage {
global $wgRequest;
// Generate a token directly instead of using $user->editToken()
// because the latter reuses $_SESSION['wsEditToken']
global $wgRequest;
// Generate a token directly instead of using $user->editToken()
// because the latter reuses $_SESSION['wsEditToken']
- $wgRequest->setSessionData( 'wsLoginToken', MWCryptRand::generateHex( 32
, __METHOD__
) );
+ $wgRequest->setSessionData( 'wsLoginToken', MWCryptRand::generateHex( 32 ) );
}
/**
}
/**
@@
-1177,7
+1173,7
@@
class LoginForm extends SpecialPage {
*/
public static function setCreateaccountToken() {
global $wgRequest;
*/
public static function setCreateaccountToken() {
global $wgRequest;
- $wgRequest->setSessionData( 'wsCreateaccountToken', MWCryptRand::generateHex( 32
, __METHOD__
) );
+ $wgRequest->setSessionData( 'wsCreateaccountToken', MWCryptRand::generateHex( 32 ) );
}
/**
}
/**
@@
-1261,6
+1257,10
@@
class LoginForm extends SpecialPage {
* @return string
*/
function makeLanguageSelectorLink( $text, $lang ) {
* @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';
$attr = array( 'uselang' => $lang );
if( $this->mType == 'signup' ) {
$attr['type'] = 'signup';