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 "Revert "Use display name in category page subheadings if provided""
[lhc/web/wiklou.git]
/
includes
/
auth
/
ConfirmLinkSecondaryAuthenticationProvider.php
diff --git
a/includes/auth/ConfirmLinkSecondaryAuthenticationProvider.php
b/includes/auth/ConfirmLinkSecondaryAuthenticationProvider.php
index
57f1e6b
..
7f121cd
100644
(file)
--- a/
includes/auth/ConfirmLinkSecondaryAuthenticationProvider.php
+++ b/
includes/auth/ConfirmLinkSecondaryAuthenticationProvider.php
@@
-2,7
+2,6
@@
namespace MediaWiki\Auth;
namespace MediaWiki\Auth;
-use StatusValue;
use User;
/**
use User;
/**
@@
-51,7
+50,11
@@
class ConfirmLinkSecondaryAuthenticationProvider extends AbstractSecondaryAuthen
return AuthenticationResponse::newAbstain();
}
return AuthenticationResponse::newAbstain();
}
- $maybeLink = array_filter( $state['maybeLink'], function ( $req ) {
+ $maybeLink = array_filter( $state['maybeLink'], function ( $req ) use ( $user ) {
+ if ( !$req->action ) {
+ $req->action = AuthManager::ACTION_CHANGE;
+ }
+ $req->username = $user->getName();
return $this->manager->allowsAuthenticationDataChange( $req )->isGood();
} );
if ( !$maybeLink ) {
return $this->manager->allowsAuthenticationDataChange( $req )->isGood();
} );
if ( !$maybeLink ) {
@@
-61,7
+64,8
@@
class ConfirmLinkSecondaryAuthenticationProvider extends AbstractSecondaryAuthen
$req = new ConfirmLinkAuthenticationRequest( $maybeLink );
return AuthenticationResponse::newUI(
[ $req ],
$req = new ConfirmLinkAuthenticationRequest( $maybeLink );
return AuthenticationResponse::newUI(
[ $req ],
- wfMessage( 'authprovider-confirmlink-message' )
+ wfMessage( 'authprovider-confirmlink-message' ),
+ 'warning'
);
}
);
}
@@
-147,7
+151,8
@@
class ConfirmLinkSecondaryAuthenticationProvider extends AbstractSecondaryAuthen
'linkOk', wfMessage( 'ok' ), wfMessage( 'authprovider-confirmlink-ok-help' )
)
],
'linkOk', wfMessage( 'ok' ), wfMessage( 'authprovider-confirmlink-ok-help' )
)
],
- $combinedStatus->getMessage( 'authprovider-confirmlink-failed' )
+ $combinedStatus->getMessage( 'authprovider-confirmlink-failed' ),
+ 'error'
);
}
}
);
}
}