dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Quote $default in PostgresUpdater::setDefault
[lhc/web/wiklou.git]
/
includes
/
rcfeed
/
IRCColourfulRCFeedFormatter.php
diff --git
a/includes/rcfeed/IRCColourfulRCFeedFormatter.php
b/includes/rcfeed/IRCColourfulRCFeedFormatter.php
index
0efcebf
..
10ba83f
100644
(file)
--- 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();
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".
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
$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;
}
$url .= $query;
}
@@
-84,7
+89,9
@@
class IRCColourfulRCFeedFormatter implements RCFeedFormatter {
) );
$flag = $attribs['rc_log_action'];
} else {
) );
$flag = $attribs['rc_log_action'];
} else {
- $comment = self::cleanupForIRC( $attribs['rc_comment'] );
+ $comment = self::cleanupForIRC(
+ CommentStore::newKey( 'rc_comment' )->getComment( $attribs )->text
+ );
$flag = '';
if ( !$attribs['rc_patrolled']
&& ( $wgUseRCPatrol || $attribs['rc_type'] == RC_NEW && $wgUseNPPatrol )
$flag = '';
if ( !$attribs['rc_patrolled']
&& ( $wgUseRCPatrol || $attribs['rc_type'] == RC_NEW && $wgUseNPPatrol )
@@
-124,8
+131,8
@@
class IRCColourfulRCFeedFormatter implements RCFeedFormatter {
*/
public static function cleanupForIRC( $text ) {
return str_replace(
*/
public static function cleanupForIRC( $text ) {
return str_replace(
-
array( "\n", "\r" )
,
-
array( " ", "" )
,
+
[ "\n", "\r" ]
,
+
[ " ", "" ]
,
Sanitizer::decodeCharReferences( $text )
);
}
Sanitizer::decodeCharReferences( $text )
);
}