Florianschmidtwelzow has uploaded a new change for review.
https://gerrit.wikimedia.org/r/195218
Change subject: Hygiene: Follow up change in ConfirmEdit
......................................................................
Hygiene: Follow up change in ConfirmEdit
SimpleCaptcha::shouldCheck needs an instance of IContextSource with
change Ife4fca8ecf03780046634f5871192f6380291c10
Change-Id: I9b8a0851624d931b8db9063b4fee749f55f45af0
---
M includes/SpamFilter/ConfirmEdit.php
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/18/195218/1
diff --git a/includes/SpamFilter/ConfirmEdit.php
b/includes/SpamFilter/ConfirmEdit.php
index 612a47c..3b8fa55 100644
--- a/includes/SpamFilter/ConfirmEdit.php
+++ b/includes/SpamFilter/ConfirmEdit.php
@@ -17,6 +17,7 @@
* @return Status
*/
public function validate( AbstractRevision $newRevision,
AbstractRevision $oldRevision = null, Title $title ) {
+ global $wgOut;
$newContent = $newRevision->getContent( 'wikitext' );
/** @var SimpleCaptcha $captcha */
@@ -25,7 +26,7 @@
// 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,
false ) && !$captcha->passCaptcha() ) {
+ if ( $captcha->shouldCheck( $wikiPage, $newContent, false,
$wgOut->getContext(), false ) && !$captcha->passCaptcha() ) {
// 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!
@@ -34,7 +35,6 @@
// some captcha implementations need CSS and/or JS,
which is added
// via their getForm() methods (which we just called) -
// let's extract those and respond them along with the
form HTML
- global $wgOut;
$html = $wgOut->buildCssLinks() .
$wgOut->getScriptsForBottomQueue( true ) .
$html;
--
To view, visit https://gerrit.wikimedia.org/r/195218
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b8a0851624d931b8db9063b4fee749f55f45af0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits