48 $mainConfig = MediaWikiServices::getInstance()->getMainConfig();
49 $canonicalServer = $mainConfig->get( MainConfigNames::CanonicalServer );
50 $serverName = $mainConfig->get( MainConfigNames::ServerName );
51 $scriptPath = $mainConfig->get( MainConfigNames::ScriptPath );
57 'type' => RecentChange::parseFromRCType( $rc->
getAttribute(
'rc_type' ) ),
58 'namespace' => $rc->
getTitle()->getNamespace(),
59 'title' => $rc->
getTitle()->getPrefixedText(),
66 if ( isset( $feed[
'channel'] ) ) {
67 $packet[
'channel'] = $feed[
'channel'];
72 $useRCPatrol = MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::UseRCPatrol );
73 $useNPPatrol = MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::UseNPPatrol );
74 $packet[
'minor'] = (bool)$rc->
getAttribute(
'rc_minor' );
75 if ( $useRCPatrol || (
$type ==
RC_NEW && $useNPPatrol ) ) {
76 $packet[
'patrolled'] = (bool)$rc->
getAttribute(
'rc_patrolled' );
86 $packet[
'revision'] = [
93 $packet[
'length'] = [
'old' =>
null,
'new' => $rc->
getAttribute(
'rc_new_len' ) ];
94 $packet[
'revision'] = [
'old' =>
null,
'new' => $rc->
getAttribute(
'rc_this_oldid' ) ];
99 $packet[
'log_type'] = $rc->
getAttribute(
'rc_log_type' );
100 $packet[
'log_action'] = $rc->
getAttribute(
'rc_log_action' );
112 foreach ( $params as $key => $value ) {
113 if ( strpos( $key,
':' ) === false ) {
114 $logParams[$key] = $value;
117 $logParam = explode(
':', $key, 3 );
118 $logParams[$logParam[2]] = $value;
120 $packet[
'log_params'] = $logParams;
122 $packet[
'log_params'] = explode(
"\n", $rc->
getAttribute(
'rc_params' ) );
125 $packet[
'log_action_comment'] = $actionComment;
129 $packet[
'server_url'] = $canonicalServer;
130 $packet[
'server_name'] = $serverName;
132 $packet[
'server_script_path'] = $scriptPath ?:
'/';
133 $packet[
'wiki'] = WikiMap::getCurrentWikiId();