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(),
67 if ( isset( $feed[
'channel'] ) ) {
68 $packet[
'channel'] = $feed[
'channel'];
73 $useRCPatrol = MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::UseRCPatrol );
74 $useNPPatrol = MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::UseNPPatrol );
75 $packet[
'minor'] = (bool)$rc->
getAttribute(
'rc_minor' );
76 if ( $useRCPatrol || (
$type ==
RC_NEW && $useNPPatrol ) ) {
77 $packet[
'patrolled'] = (bool)$rc->
getAttribute(
'rc_patrolled' );
87 $packet[
'revision'] = [
94 $packet[
'length'] = [
'old' =>
null,
'new' => $rc->
getAttribute(
'rc_new_len' ) ];
95 $packet[
'revision'] = [
'old' =>
null,
'new' => $rc->
getAttribute(
'rc_this_oldid' ) ];
100 $packet[
'log_type'] = $rc->
getAttribute(
'rc_log_type' );
101 $packet[
'log_action'] = $rc->
getAttribute(
'rc_log_action' );
106 $rc->
getAttribute(
'rc_params' ) == serialize(
false ) ||
113 foreach ( $params as $key => $value ) {
114 if ( strpos( $key,
':' ) === false ) {
115 $logParams[$key] = $value;
118 $logParam = explode(
':', $key, 3 );
119 $logParams[$logParam[2]] = $value;
121 $packet[
'log_params'] = $logParams;
123 $packet[
'log_params'] = explode(
"\n", $rc->
getAttribute(
'rc_params' ) );
126 $packet[
'log_action_comment'] = $actionComment;
130 $packet[
'server_url'] = $canonicalServer;
131 $packet[
'server_name'] = $serverName;
133 $packet[
'server_script_path'] = $scriptPath ?:
'/';
134 $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.