66 'type' => RecentChange::parseFromRCType( $rc->
getAttribute(
'rc_type' ) ),
67 'namespace' => $rc->
getTitle()->getNamespace(),
68 'title' => $rc->
getTitle()->getPrefixedText(),
69 'title_url' => $rc->
getTitle()->getCanonicalURL(),
77 if ( isset( $feed[
'channel'] ) ) {
78 $packet[
'channel'] = $feed[
'channel'];
85 $packet[
'minor'] = (bool)$rc->
getAttribute(
'rc_minor' );
86 if ( $useRCPatrol || ( $type ==
RC_NEW && $useNPPatrol ) ) {
87 $packet[
'patrolled'] = (bool)$rc->
getAttribute(
'rc_patrolled' );
97 $packet[
'revision'] = [
104 $packet[
'length'] = [
'old' =>
null,
'new' => $rc->
getAttribute(
'rc_new_len' ) ];
105 $packet[
'revision'] = [
'old' =>
null,
'new' => $rc->
getAttribute(
'rc_this_oldid' ) ];
110 $packet[
'log_type'] = $rc->
getAttribute(
'rc_log_type' );
111 $packet[
'log_action'] = $rc->
getAttribute(
'rc_log_action' );
116 $rc->
getAttribute(
'rc_params' ) == serialize(
false ) ||
123 foreach (
$params as $key => $value ) {
124 if ( strpos( $key,
':' ) === false ) {
125 $logParams[$key] = $value;
128 $logParam = explode(
':', $key, 3 );
129 $logParams[$logParam[2]] = $value;
131 $packet[
'log_params'] = $logParams;
133 $packet[
'log_params'] = explode(
"\n", $rc->
getAttribute(
'rc_params' ) );
136 $packet[
'log_action_comment'] = $actionComment;
140 $packet[
'server_url'] = $canonicalServer;
141 $packet[
'server_name'] = $serverName;
143 $packet[
'server_script_path'] = $scriptPath ?:
'/';
144 $packet[
'wiki'] = WikiMap::getCurrentWikiId();
150class_alias( MachineReadableRCFeedFormatter::class,
'MachineReadableRCFeedFormatter' );
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
array $params
The job parameters.
A class containing constants representing the names of configuration variables.
const ServerName
Name constant for the ServerName setting, for use with Config::get()
const UseRCPatrol
Name constant for the UseRCPatrol setting, for use with Config::get()
const CanonicalServer
Name constant for the CanonicalServer setting, for use with Config::get()
const ScriptPath
Name constant for the ScriptPath setting, for use with Config::get()
const UseNPPatrol
Name constant for the UseNPPatrol setting, for use with Config::get()
Utility class for creating new RC entries.
parseParams()
Parses and returns the rc_params attribute.
getAttribute( $name)
Get an attribute value.
getNotifyUrl()
Get the extra URL that is given as part of the notification to RCFeed consumers.