jenkins-bot has submitted this change and it was merged. Change subject: Copy context request changes to wgRequest global ......................................................................
Copy context request changes to wgRequest global Bug: T118052 Change-Id: I2246e6970b843a4418bf979e9e8b0909f221f1bb (cherry picked from commit 92c5d846dac2a20c040d52b240bfb84d8c26e27e) --- M SimpleCaptcha/Captcha.php 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php index d1170ba..71c32ca 100755 --- a/SimpleCaptcha/Captcha.php +++ b/SimpleCaptcha/Captcha.php @@ -575,12 +575,17 @@ * @return bool false if the CAPTCHA is rejected, true otherwise */ private function doConfirmEdit( WikiPage $page, $newtext, $section, IContextSource $context ) { + global $wgRequest; $request = $context->getRequest(); + // FIXME: Stop using wgRequest in other parts of ConfirmEdit so we can + // stop having to duplicate code for it. if ( $request->getVal( 'captchaid' ) ) { $request->setVal( 'wpCaptchaId', $request->getVal( 'captchaid' ) ); + $wgRequest->setVal( 'wpCaptchaId', $request->getVal( 'captchaid' ) ); } if ( $request->getVal( 'captchaword' ) ) { $request->setVal( 'wpCaptchaWord', $request->getVal( 'captchaword' ) ); + $wgRequest->setVal( 'wpCaptchaWord', $request->getVal( 'captchaword' ) ); } if ( $this->shouldCheck( $page, $newtext, $section, $context ) ) { return $this->passCaptchaLimited(); @@ -856,7 +861,6 @@ $info = $this->retrieveCaptcha( $wgRequest ); if ( $info ) { - global $wgRequest; if ( $this->keyMatch( $wgRequest->getVal( 'wpCaptchaWord' ), $info ) ) { $this->log( "passed" ); $this->clearCaptcha( $info ); -- To view, visit https://gerrit.wikimedia.org/r/251673 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2246e6970b843a4418bf979e9e8b0909f221f1bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ConfirmEdit Gerrit-Branch: wmf/1.27.0-wmf.5 Gerrit-Owner: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: Alex Monk <kren...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits