mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-12-18 10:53:01 +00:00
Use Parser::getUserIdentity() instead of ::getUser() in SimpleCaptcha
ParserOptions::__construct() and Parser::preSaveTransform() both
accept an UserIdentity and don't need a full user object.
Bug: T289731
Change-Id: I9e3d3f21452167ae1b1e9dca664605ee471f90e2
(cherry picked from commit fc7a88124e
)
This commit is contained in:
parent
adf3f5885e
commit
190d8b7579
|
@ -1152,7 +1152,7 @@ class SimpleCaptcha {
|
||||||
*/
|
*/
|
||||||
private function findLinks( $title, $text ) {
|
private function findLinks( $title, $text ) {
|
||||||
$parser = MediaWikiServices::getInstance()->getParser();
|
$parser = MediaWikiServices::getInstance()->getParser();
|
||||||
$user = $parser->getUser();
|
$user = $parser->getUserIdentity();
|
||||||
$options = new ParserOptions( $user );
|
$options = new ParserOptions( $user );
|
||||||
$text = $parser->preSaveTransform( $text, $title, $user, $options );
|
$text = $parser->preSaveTransform( $text, $title, $user, $options );
|
||||||
$out = $parser->parse( $text, $title, $options );
|
$out = $parser->parse( $text, $title, $options );
|
||||||
|
|
Loading…
Reference in a new issue