From: Ori Livneh Date: Tue, 6 May 2014 01:07:16 +0000 (-0700) Subject: Expose server name in rc feed X-Git-Tag: 1.31.0-rc.0~15834^2 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=5c74ac9feb107b6a2ac86685e4ccc9ca8572c1c0;p=lhc%2Fweb%2Fwiklou.git Expose server name in rc feed Reviewers of Id819246a9 (Tim, Timo, Chad) have commented that it would be preferable to identify wikis by their canonical hostname rather than the value of $wgDBname. Exposing it here so that the rcstream server can filter subscriptions by it. Change-Id: I503a0134a8613daddaae9d8df29a1e27fbfd93bc --- diff --git a/includes/rcfeed/MachineReadableRCFeedFormatter.php b/includes/rcfeed/MachineReadableRCFeedFormatter.php index e5077a291b..3f17bcd82a 100644 --- a/includes/rcfeed/MachineReadableRCFeedFormatter.php +++ b/includes/rcfeed/MachineReadableRCFeedFormatter.php @@ -38,7 +38,7 @@ abstract class MachineReadableRCFeedFormatter implements RCFeedFormatter { * @see RCFeedFormatter::getLine */ public function getLine( array $feed, RecentChange $rc, $actionComment ) { - global $wgCanonicalServer, $wgScriptPath; + global $wgCanonicalServer, $wgServerName, $wgScriptPath; $attrib = $rc->getAttributes(); $packet = array( @@ -120,6 +120,8 @@ abstract class MachineReadableRCFeedFormatter implements RCFeedFormatter { } $packet['server_url'] = $wgCanonicalServer; + $packet['server_name'] = $wgServerName; + $packet['server_script_path'] = $wgScriptPath ?: '/'; $packet['wiki'] = wfWikiID();