Addshore has uploaded a new change for review.

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

Change subject: Ignore RC_CATEGORIZE changes for RecentChange_save
......................................................................

Ignore RC_CATEGORIZE changes for RecentChange_save

Bug: T125209
Change-Id: Ib09d219e00ec71c11e4fad57ec0e7517481698ab
---
M CheckUser.hooks.php
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser 
refs/changes/46/267246/1

diff --git a/CheckUser.hooks.php b/CheckUser.hooks.php
index 38bd5b8..08ede6e 100755
--- a/CheckUser.hooks.php
+++ b/CheckUser.hooks.php
@@ -9,6 +9,15 @@
        public static function updateCheckUserData( RecentChange $rc ) {
                global $wgRequest;
 
+               /**
+                * RC_CATEGORIZE recent changes are generally triggered by 
other edits.
+                * Thus there is no reason to store checkuser data about them.
+                * @see https://phabricator.wikimedia.org/T125209
+                */
+               if ( $rc->getAttribute( 'rc_type' ) === RC_CATEGORIZE ) {
+                       return true;
+               }
+
                $attribs = $rc->getAttributes();
                // Get IP
                $ip = $wgRequest->getIP();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib09d219e00ec71c11e4fad57ec0e7517481698ab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CheckUser
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>

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

Reply via email to