49 $mainConfig = MediaWikiServices::getInstance()->getMainConfig();
50 $canonicalServer = $mainConfig->get( MainConfigNames::CanonicalServer );
51 $serverName = $mainConfig->get( MainConfigNames::ServerName );
52 $scriptPath = $mainConfig->get( MainConfigNames::ScriptPath );
59 'namespace' => $rc->
getTitle()->getNamespace(),
60 'title' => $rc->
getTitle()->getPrefixedText(),
61 'title_url' => $rc->
getTitle()->getCanonicalURL(),
69 if ( isset( $feed[
'channel'] ) ) {
70 $packet[
'channel'] = $feed[
'channel'];
75 $useRCPatrol = MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::UseRCPatrol );
76 $useNPPatrol = MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::UseNPPatrol );
77 $packet[
'minor'] = (bool)$rc->
getAttribute(
'rc_minor' );
78 if ( $useRCPatrol || ( $type ==
RC_NEW && $useNPPatrol ) ) {
79 $packet[
'patrolled'] = (bool)$rc->
getAttribute(
'rc_patrolled' );
89 $packet[
'revision'] = [
96 $packet[
'length'] = [
'old' =>
null,
'new' => $rc->
getAttribute(
'rc_new_len' ) ];
97 $packet[
'revision'] = [
'old' =>
null,
'new' => $rc->
getAttribute(
'rc_this_oldid' ) ];
102 $packet[
'log_type'] = $rc->
getAttribute(
'rc_log_type' );
103 $packet[
'log_action'] = $rc->
getAttribute(
'rc_log_action' );
108 $rc->
getAttribute(
'rc_params' ) == serialize(
false ) ||
115 foreach ( $params as $key => $value ) {
116 if ( strpos( $key,
':' ) === false ) {
117 $logParams[$key] = $value;
120 $logParam = explode(
':', $key, 3 );
121 $logParams[$logParam[2]] = $value;
123 $packet[
'log_params'] = $logParams;
125 $packet[
'log_params'] = explode(
"\n", $rc->
getAttribute(
'rc_params' ) );
128 $packet[
'log_action_comment'] = $actionComment;
132 $packet[
'server_url'] = $canonicalServer;
133 $packet[
'server_name'] = $serverName;
135 $packet[
'server_script_path'] = $scriptPath ?:
'/';
136 $packet[
'wiki'] = WikiMap::getCurrentWikiId();
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
A class containing constants representing the names of configuration variables.
Utility class for creating new RC entries.
parseParams()
Parses and returns the rc_params attribute.
static parseFromRCType( $rcType)
Parsing RC_* constants to human-readable test.
getAttribute( $name)
Get an attribute value.
getNotifyUrl()
Get the extra URL that is given as part of the notification to RCFeed consumers.