X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Frcfeed%2FIRCColourfulRCFeedFormatter.php;h=02a8d7eb858e12abf32ba6e2f6abe60f8a64e402;hb=4f1390819a8fcd91c0c34449736fff4548032ad3;hp=ddbb5485403d5bcdef4233357ed2ca32064c4116;hpb=c131c00ea5776c986847852314b9305b7738d329;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/rcfeed/IRCColourfulRCFeedFormatter.php b/includes/rcfeed/IRCColourfulRCFeedFormatter.php index ddbb548540..02a8d7eb85 100644 --- a/includes/rcfeed/IRCColourfulRCFeedFormatter.php +++ b/includes/rcfeed/IRCColourfulRCFeedFormatter.php @@ -30,7 +30,7 @@ class IRCColourfulRCFeedFormatter implements RCFeedFormatter { * @see RCFeedFormatter::getLine */ public function getLine( array $feed, RecentChange $rc, $actionComment ) { - global $wgUseRCPatrol, $wgUseNPPatrol, $wgLocalInterwiki, + global $wgUseRCPatrol, $wgUseNPPatrol, $wgLocalInterwikis, $wgCanonicalServer, $wgScript; $attribs = $rc->getAttributes(); if ( $attribs['rc_type'] == RC_LOG ) { @@ -56,7 +56,7 @@ class IRCColourfulRCFeedFormatter implements RCFeedFormatter { $query .= '&rcid=' . $attribs['rc_id']; } // HACK: We need this hook for WMF's secure server setup - wfRunHooks( 'IRCLineURL', array( &$url, &$query ) ); + wfRunHooks( 'IRCLineURL', array( &$url, &$query, $rc ) ); $url .= $query; } @@ -77,19 +77,27 @@ class IRCColourfulRCFeedFormatter implements RCFeedFormatter { if ( $attribs['rc_type'] == RC_LOG ) { $targetText = $rc->getTitle()->getPrefixedText(); - $comment = self::cleanupForIRC( str_replace( "[[$targetText]]", "[[\00302$targetText\00310]]", $actionComment ) ); + $comment = self::cleanupForIRC( str_replace( + "[[$targetText]]", + "[[\00302$targetText\00310]]", + $actionComment + ) ); $flag = $attribs['rc_log_action']; } else { $comment = self::cleanupForIRC( $attribs['rc_comment'] ); $flag = ''; - if ( !$attribs['rc_patrolled'] && ( $wgUseRCPatrol || $attribs['rc_type'] == RC_NEW && $wgUseNPPatrol ) ) { + if ( !$attribs['rc_patrolled'] + && ( $wgUseRCPatrol || $attribs['rc_type'] == RC_NEW && $wgUseNPPatrol ) + ) { $flag .= '!'; } - $flag .= ( $attribs['rc_type'] == RC_NEW ? "N" : "" ) . ( $attribs['rc_minor'] ? "M" : "" ) . ( $attribs['rc_bot'] ? "B" : "" ); + $flag .= ( $attribs['rc_type'] == RC_NEW ? "N" : "" ) + . ( $attribs['rc_minor'] ? "M" : "" ) . ( $attribs['rc_bot'] ? "B" : "" ); } - if ( $feed['add_interwiki_prefix'] === true && $wgLocalInterwiki !== false ) { - $prefix = $wgLocalInterwiki; + if ( $feed['add_interwiki_prefix'] === true && $wgLocalInterwikis ) { + // we use the first entry in $wgLocalInterwikis in recent changes feeds + $prefix = $wgLocalInterwikis[0]; } elseif ( $feed['add_interwiki_prefix'] ) { $prefix = $feed['add_interwiki_prefix']; } else {