Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289155

Change subject: Fix Flow for AuthManager-changes in ConfirmEdit
......................................................................

Fix Flow for AuthManager-changes in ConfirmEdit

ConfirmEdits passCaptchaLimited now needs some more parameters,
or you can use passCaptchaLimitedFromRequest(), which loads the required
things from the passed WebRequest object. Because Flow passes an actual
IContextSource instance to the Captcha check, it's easier to pass the
required WebRequest and User object to passCaptchaLimitedFromRequest().
This commit changes the use of it, instead of passCaptchaLimited.

Follow up: I0da671a546700110d789b79a3089460abd9cce3b

Bug: T135477
Change-Id: Ia6cd857d59b616d6e155771dd186b22c82be4344
---
M includes/SpamFilter/ConfirmEdit.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/55/289155/1

diff --git a/includes/SpamFilter/ConfirmEdit.php 
b/includes/SpamFilter/ConfirmEdit.php
index 3b6ae25..1f6dde1 100644
--- a/includes/SpamFilter/ConfirmEdit.php
+++ b/includes/SpamFilter/ConfirmEdit.php
@@ -29,7 +29,10 @@
 
                // first check if the submitted content is offensive (as 
flagged by
                // ConfirmEdit), next check for a (valid) captcha to have been 
entered
-               if ( $captcha->shouldCheck( $wikiPage, $newContent, false, 
$context, $oldContent ) && !$captcha->passCaptchaLimited() ) {
+               if (
+                       $captcha->shouldCheck( $wikiPage, $newContent, false, 
$context, $oldContent ) &&
+                       !$captcha->passCaptchaLimitedFromRequest( 
$context->getRequest(), $context->getUser() )
+               ) {
                        // getting here means we submitted bad content without 
good captcha
                        // result (or any captcha result at all) - let's get 
the captcha
                        // HTML to display as error message!

-- 
To view, visit https://gerrit.wikimedia.org/r/289155
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6cd857d59b616d6e155771dd186b22c82be4344
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to