* @see RCFeedFormatter::getLine
*/
public function getLine( array $feed, RecentChange $rc, $actionComment ) {
- global $wgCanonicalServer, $wgScriptPath;
+ global $wgCanonicalServer, $wgServerName, $wgScriptPath;
$attrib = $rc->getAttributes();
$packet = array(
// but there is no real reason not to expose it in other cases,
// and I can see how this may be potentially useful for clients.
'id' => $attrib['rc_id'],
- 'type' => $attrib['rc_type'],
+ 'type' => RecentChange::parseFromRCType( $attrib['rc_type'] ),
'namespace' => $rc->getTitle()->getNamespace(),
'title' => $rc->getTitle()->getPrefixedText(),
'comment' => $attrib['rc_comment'],
if ( $type == RC_EDIT || $type == RC_NEW ) {
global $wgUseRCPatrol, $wgUseNPPatrol;
- $packet['minor'] = $attrib['rc_minor'];
+ $packet['minor'] = (bool)$attrib['rc_minor'];
if ( $wgUseRCPatrol || ( $type == RC_NEW && $wgUseNPPatrol ) ) {
- $packet['patrolled'] = $attrib['rc_patrolled'];
+ $packet['patrolled'] = (bool)$attrib['rc_patrolled'];
}
}
}
$packet['server_url'] = $wgCanonicalServer;
+ $packet['server_name'] = $wgServerName;
+
$packet['server_script_path'] = $wgScriptPath ?: '/';
$packet['wiki'] = wfWikiID();