mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-12 01:11:15 +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
This commit is contained in:
parent
adf3f5885e
commit
fc7a88124e
|
@ -1152,7 +1152,7 @@ class SimpleCaptcha {
|
|||
*/
|
||||
private function findLinks( $title, $text ) {
|
||||
$parser = MediaWikiServices::getInstance()->getParser();
|
||||
$user = $parser->getUser();
|
||||
$user = $parser->getUserIdentity();
|
||||
$options = new ParserOptions( $user );
|
||||
$text = $parser->preSaveTransform( $text, $title, $user, $options );
|
||||
$out = $parser->parse( $text, $title, $options );
|
||||
|
|
Loading…
Reference in a new issue