Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/81856
Change subject: Fill in defaults for omitted parameters to RecentChange::sendToUDP ...................................................................... Fill in defaults for omitted parameters to RecentChange::sendToUDP Not all callers of RecentChange::sendToUDP pass all the parameters -- which is to be expected, since the sendToUDP's signature specifies the empty string as default. It is not correct to leave the values empty, though, since they are used to construct the logging URL. When the parameters are unset, the correct behavior should be to fill in defaults from $wgRC2UDP*. Change-Id: I4570473ae7382e602292e58a41e440325a65a275 --- M includes/RecentChange.php 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/56/81856/1 diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 45a8fbc..248cc33 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -297,12 +297,23 @@ * @deprecated since 1.22 */ public static function sendToUDP( $line, $address = '', $prefix = '', $port = '' ) { - global $wgRC2UDPPrefix, $wgRC2UDPInterwikiPrefix; + global $wgRC2UDPAddress, $wgRC2UDPInterwikiPrefix, $wgRC2UDPPort, $wgRC2UDPPrefix; + wfDeprecated( __METHOD__, '1.22' ); + + if ( $prefix === '' ) { + $prefix = $wgRC2UDPPrefix; + } + if ( $port === '' ) { + $port = $wgRC2UDPPort; + } + if ( $address === '' ) { + $address = $wgRC2UDPAddress; + } $engine = new UDPRCFeedEngine(); $feed = array( - 'uri' => "udp://$address:$port/$wgRC2UDPPrefix", + 'uri' => "udp://$address:$port/$prefix", 'formatter' => 'IRCColourfulRCFeedFormatter', 'add_interwiki_prefix' => $wgRC2UDPInterwikiPrefix, ); -- To view, visit https://gerrit.wikimedia.org/r/81856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4570473ae7382e602292e58a41e440325a65a275 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ori.livneh <o...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits