* @deprecated since 1.22
*/
public static function sendToUDP( $line, $address = '', $prefix = '', $port = '' ) {
- global $wgRC2UDPPrefix, $wgRC2UDPInterwikiPrefix;
+ global $wgRC2UDPAddress, $wgRC2UDPInterwikiPrefix, $wgRC2UDPPort, $wgRC2UDPPrefix;
+
wfDeprecated( __METHOD__, '1.22' );
+ # Assume default for standard RC case
+ $address = $address ? $address : $wgRC2UDPAddress;
+ $prefix = $prefix ? $prefix : $wgRC2UDPPrefix;
+ $port = $port ? $port : $wgRC2UDPPort;
+
$engine = new UDPRCFeedEngine();
$feed = array(
- 'uri' => "udp://$address:$port/$wgRC2UDPPrefix",
+ 'uri' => "udp://$address:$port/$prefix",
'formatter' => 'IRCColourfulRCFeedFormatter',
'add_interwiki_prefix' => $wgRC2UDPInterwikiPrefix,
);
global $wgRCFeeds;
foreach ( $wgRCFeeds as $feed ) {
- $engine = self::getStreamEngine( $feed['uri'] );
+ $engine = self::getEngine( $feed['uri'] );
- if ( isset( $this->mExtras['actionCommentIRC'] ) ) {
- $actionComment = $this->mExtras['actionCommentIRC'];
+ if ( isset( $this->mExtra['actionCommentIRC'] ) ) {
+ $actionComment = $this->mExtra['actionCommentIRC'];
} else {
$actionComment = null;
}
}
/**
- * Gets the stream engine object for a given URI from $wgStreamLoggers
+ * Gets the stream engine object for a given URI from $wgRCEngines
*
* @param $uri string URI to get the engine object for
* @return object The engine object
*/
- private static function getStreamEngine( $uri ) {
- global $wgStreamLoggers;
+ private static function getEngine( $uri ) {
+ global $wgRCEngines;
$scheme = parse_url( $uri, PHP_URL_SCHEME );
if ( !$scheme ) {
throw new MWException( __FUNCTION__ . ": Invalid stream logger URI: '$uri'" );
}
- if ( !isset( $wgStreamLoggers[$scheme] ) ) {
+ if ( !isset( $wgRCEngines[$scheme] ) ) {
throw new MWException( __FUNCTION__ . ": Unknown stream logger URI scheme: $scheme" );
}
- return new $wgStreamLoggers[$scheme];
+ return new $wgRCEngines[$scheme];
}
/**