67 'type' => RecentChange::parseFromRCType( $rc->
getAttribute(
'rc_type' ) ),
68 'namespace' => $rc->
getTitle()->getNamespace(),
69 'title' => $rc->
getTitle()->getPrefixedText(),
70 'title_url' => $rc->
getTitle()->getCanonicalURL(),
78 if ( isset( $feed[
'channel'] ) ) {
79 $packet[
'channel'] = $feed[
'channel'];
86 $packet[
'minor'] = (bool)$rc->
getAttribute(
'rc_minor' );
87 if ( $useRCPatrol || ( $type ==
RC_NEW && $useNPPatrol ) ) {
88 $packet[
'patrolled'] = (bool)$rc->
getAttribute(
'rc_patrolled' );
98 $packet[
'revision'] = [
105 $packet[
'length'] = [
'old' =>
null,
'new' => $rc->
getAttribute(
'rc_new_len' ) ];
106 $packet[
'revision'] = [
'old' =>
null,
'new' => $rc->
getAttribute(
'rc_this_oldid' ) ];
111 $packet[
'log_type'] = $rc->
getAttribute(
'rc_log_type' );
112 $packet[
'log_action'] = $rc->
getAttribute(
'rc_log_action' );
117 $rc->
getAttribute(
'rc_params' ) == serialize(
false ) ||
124 foreach (
$params as $key => $value ) {
125 if ( strpos( $key,
':' ) === false ) {
126 $logParams[$key] = $value;
129 $logParam = explode(
':', $key, 3 );
130 $logParams[$logParam[2]] = $value;
132 $packet[
'log_params'] = $logParams;
134 $packet[
'log_params'] = explode(
"\n", $rc->
getAttribute(
'rc_params' ) );
137 $packet[
'log_action_comment'] = $actionComment;
141 $packet[
'server_url'] = $canonicalServer;
142 $packet[
'server_name'] = $serverName;
144 $packet[
'server_script_path'] = $scriptPath ?:
'/';
145 $packet[
'wiki'] = WikiMap::getCurrentWikiId();
151class_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 and reading rows in the recentchanges table.
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.