53 $mainConfig = $services->getMainConfig();
63 if ( $attribs[
'rc_type'] ==
RC_LOG ) {
66 $titleObj = Title::newFromText(
'Log/' . $attribs[
'rc_log_type'],
NS_SPECIAL );
70 $title = $titleObj->getPrefixedText();
75 if ( $attribs[
'rc_old_len'] !==
null && $attribs[
'rc_new_len'] !==
null ) {
76 $szdiff = $attribs[
'rc_new_len'] - $attribs[
'rc_old_len'];
77 if ( $szdiff < -500 ) {
78 $szdiff =
"\002$szdiff\002";
79 } elseif ( $szdiff >= 0 ) {
80 $szdiff =
'+' . $szdiff;
83 $szdiff =
'(' . $szdiff .
')';
90 if ( $attribs[
'rc_type'] ==
RC_LOG ) {
91 $targetText = $rc->
getTitle()->getPrefixedText();
94 "[[\00302$targetText\00310]]",
97 $flag = $attribs[
'rc_log_action'];
99 $store = $services->getCommentStore();
102 if ( !$attribs[
'rc_patrolled']
103 && ( $useRCPatrol || ( $attribs[
'rc_type'] ==
RC_NEW && $useNPPatrol ) )
107 $flag .= ( $attribs[
'rc_type'] ==
RC_NEW ?
"N" :
"" )
108 . ( $attribs[
'rc_minor'] ?
"M" :
"" ) . ( $attribs[
'rc_bot'] ?
"B" :
"" );
111 if ( $feed[
'add_interwiki_prefix'] ===
true && $localInterwikis ) {
113 $prefix = $localInterwikis[0];
114 } elseif ( $feed[
'add_interwiki_prefix'] ) {
115 $prefix = $feed[
'add_interwiki_prefix'];
119 if ( $prefix !==
false ) {
120 $titleString =
"\00314[[\00303$prefix:\00307$title\00314]]";
122 $titleString =
"\00314[[\00307$title\00314]]";
126 # no colour (\003) switches back to the term default
127 $fullString =
"$titleString\0034 $flag\00310 " .
128 "\00302$notifyUrl\003 \0035*\003 \00303$user\003 \0035*\003 $szdiff \00310$comment\003\n";
142 Sanitizer::decodeCharReferences( $text )
147class_alias( IRCColourfulRCFeedFormatter::class,
'IRCColourfulRCFeedFormatter' );
A class containing constants representing the names of configuration variables.
const UseRCPatrol
Name constant for the UseRCPatrol setting, for use with Config::get()
const UseNPPatrol
Name constant for the UseNPPatrol setting, for use with Config::get()
const LocalInterwikis
Name constant for the LocalInterwikis setting, for use with Config::get()
Utility class for creating and reading rows in the recentchanges table.
getNotifyUrl()
Get the extra URL that is given as part of the notification to RCFeed consumers.