X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Frcfeed%2FIRCColourfulRCFeedFormatter.php;h=ddea69511ac8c4bfe94849e154d9cdff329194ae;hb=e3bd13db0c285f312e31bb1b7271af4628cca80c;hp=0efcebf9a38c4758ab2b454c98b4cfc2c97ecbce;hpb=3c18e32e58d53ab38d1dd52d00f248ddef435ebd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/rcfeed/IRCColourfulRCFeedFormatter.php b/includes/rcfeed/IRCColourfulRCFeedFormatter.php index 0efcebf9a3..ddea69511a 100644 --- a/includes/rcfeed/IRCColourfulRCFeedFormatter.php +++ b/includes/rcfeed/IRCColourfulRCFeedFormatter.php @@ -33,6 +33,11 @@ class IRCColourfulRCFeedFormatter implements RCFeedFormatter { global $wgUseRCPatrol, $wgUseNPPatrol, $wgLocalInterwikis, $wgCanonicalServer, $wgScript; $attribs = $rc->getAttributes(); + if ( $attribs['rc_type'] == RC_CATEGORIZE ) { + // Don't send RC_CATEGORIZE events to IRC feed (T127360) + return null; + } + if ( $attribs['rc_type'] == RC_LOG ) { // Don't use SpecialPage::getTitleFor, backwards compatibility with // IRC API which expects "Log". @@ -56,7 +61,7 @@ class IRCColourfulRCFeedFormatter implements RCFeedFormatter { $query .= '&rcid=' . $attribs['rc_id']; } // HACK: We need this hook for WMF's secure server setup - Hooks::run( 'IRCLineURL', array( &$url, &$query, $rc ) ); + Hooks::run( 'IRCLineURL', [ &$url, &$query, $rc ] ); $url .= $query; } @@ -124,8 +129,8 @@ class IRCColourfulRCFeedFormatter implements RCFeedFormatter { */ public static function cleanupForIRC( $text ) { return str_replace( - array( "\n", "\r" ), - array( " ", "" ), + [ "\n", "\r" ], + [ " ", "" ], Sanitizer::decodeCharReferences( $text ) ); }