49 $services = MediaWikiServices::getInstance();
50 $mainConfig = $services->getMainConfig();
51 $localInterwikis = $mainConfig->get( MainConfigNames::LocalInterwikis );
52 $useRCPatrol = $mainConfig->get( MainConfigNames::UseRCPatrol );
53 $useNPPatrol = $mainConfig->get( MainConfigNames::UseNPPatrol );
60 if ( $attribs[
'rc_type'] ==
RC_LOG ) {
63 $titleObj = Title::newFromText(
'Log/' . $attribs[
'rc_log_type'],
NS_SPECIAL );
67 $title = $titleObj->getPrefixedText();
72 if ( $attribs[
'rc_old_len'] !==
null && $attribs[
'rc_new_len'] !==
null ) {
73 $szdiff = $attribs[
'rc_new_len'] - $attribs[
'rc_old_len'];
74 if ( $szdiff < -500 ) {
75 $szdiff =
"\002$szdiff\002";
76 } elseif ( $szdiff >= 0 ) {
77 $szdiff =
'+' . $szdiff;
80 $szdiff =
'(' . $szdiff .
')';
87 if ( $attribs[
'rc_type'] ==
RC_LOG ) {
88 $targetText = $rc->
getTitle()->getPrefixedText();
91 "[[\00302$targetText\00310]]",
94 $flag = $attribs[
'rc_log_action'];
96 $store = $services->getCommentStore();
99 if ( !$attribs[
'rc_patrolled']
100 && ( $useRCPatrol || ( $attribs[
'rc_type'] ==
RC_NEW && $useNPPatrol ) )
104 $flag .= ( $attribs[
'rc_type'] ==
RC_NEW ?
"N" :
"" )
105 . ( $attribs[
'rc_minor'] ?
"M" :
"" ) . ( $attribs[
'rc_bot'] ?
"B" :
"" );
108 if ( $feed[
'add_interwiki_prefix'] ===
true && $localInterwikis ) {
110 $prefix = $localInterwikis[0];
111 } elseif ( $feed[
'add_interwiki_prefix'] ) {
112 $prefix = $feed[
'add_interwiki_prefix'];
116 if ( $prefix !==
false ) {
117 $titleString =
"\00314[[\00303$prefix:\00307$title\00314]]";
119 $titleString =
"\00314[[\00307$title\00314]]";
123 # no colour (\003) switches back to the term default
124 $fullString =
"$titleString\0034 $flag\00310 " .
125 "\00302$notifyUrl\003 \0035*\003 \00303$user\003 \0035*\003 $szdiff \00310$comment\003\n";