From 5c74ac9feb107b6a2ac86685e4ccc9ca8572c1c0 Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Mon, 5 May 2014 18:07:16 -0700 Subject: [PATCH] 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 --- includes/rcfeed/MachineReadableRCFeedFormatter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); -- 2.20.1