Jdlrobson has uploaded a new change for review.

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

Change subject: Correct the title used in Special:CheckUser for abuse filter 
rule matches
......................................................................

Correct the title used in Special:CheckUser for abuse filter rule matches

Was linking to Gather page on wiki main namespace. Should be special page.

Change-Id: I901f83b9c00d7decd9b9c76575c6e35a126de56e
---
M includes/api/ApiEditList.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/49/201249/1

diff --git a/includes/api/ApiEditList.php b/includes/api/ApiEditList.php
index 62932f9..c717358 100644
--- a/includes/api/ApiEditList.php
+++ b/includes/api/ApiEditList.php
@@ -41,6 +41,7 @@
 use User;
 use ApiPageSet;
 use WatchAction;
+use SpecialPage;
 
 /**
  * API module to allow users to manage lists
@@ -138,12 +139,14 @@
                }
                if ( class_exists( 'AbuseFilterVariableHolder' ) ) {
                        $vars = new AbuseFilterVariableHolder();
-                       $vars->addHolders( AbuseFilter::generateUserVars( 
$this->getUser() ) );
+                       $user = $this->getUser();
+                       $vars->addHolders( AbuseFilter::generateUserVars( $user 
) );
                        $vars->setVar( 'action', 'gatheredit' );
                        $vars->setVar( 'old_wikitext', '' );
                        $vars->setVar( 'new_wikitext', $string );
                        $vars->setVar( 'added_lines', $string );
-                       $result = AbuseFilter::filterAction( $vars, 
Title::newFromText( 'Gather' ) );
+                       $title = SpecialPage::getTitleFor( 'Gather' 
)->getSubPage( 'by' )->getSubPage( $user->getName() );
+                       $result = AbuseFilter::filterAction( $vars, $title );
                        return $result->isGood();
                }
                return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I901f83b9c00d7decd9b9c76575c6e35a126de56e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to