Go to the documentation of this file.
47 if ( $attribs[
'rc_type'] ==
RC_LOG ) {
54 $title = $titleObj->getPrefixedText();
57 if ( $attribs[
'rc_type'] ==
RC_LOG ) {
61 if ( $attribs[
'rc_type'] ==
RC_NEW ) {
62 $query =
'?oldid=' . $attribs[
'rc_this_oldid'];
64 $query =
'?diff=' . $attribs[
'rc_this_oldid'] .
'&oldid=' . $attribs[
'rc_last_oldid'];
67 $query .=
'&rcid=' . $attribs[
'rc_id'];
70 Hooks::run(
'IRCLineURL', [ &$url, &$query, $rc ] );
74 if ( $attribs[
'rc_old_len'] !==
null && $attribs[
'rc_new_len'] !==
null ) {
75 $szdiff = $attribs[
'rc_new_len'] - $attribs[
'rc_old_len'];
76 if ( $szdiff < -500 ) {
77 $szdiff =
"\002$szdiff\002";
78 } elseif ( $szdiff >= 0 ) {
79 $szdiff =
'+' . $szdiff;
82 $szdiff =
'(' . $szdiff .
')';
89 if ( $attribs[
'rc_type'] ==
RC_LOG ) {
90 $targetText = $rc->
getTitle()->getPrefixedText();
93 "[[\00302$targetText\00310]]",
96 $flag = $attribs[
'rc_log_action'];
98 $store = MediaWikiServices::getInstance()->getCommentStore();
100 $store->getComment(
'rc_comment', $attribs )->text
103 if ( !$attribs[
'rc_patrolled']
108 $flag .= ( $attribs[
'rc_type'] ==
RC_NEW ?
"N" :
"" )
109 . ( $attribs[
'rc_minor'] ?
"M" :
"" ) . ( $attribs[
'rc_bot'] ?
"B" :
"" );
115 } elseif ( $feed[
'add_interwiki_prefix'] ) {
116 $prefix = $feed[
'add_interwiki_prefix'];
120 if ( $prefix !==
false ) {
121 $titleString =
"\00314[[\00303$prefix:\00307$title\00314]]";
123 $titleString =
"\00314[[\00307$title\00314]]";
126 # see http://www.irssi.org/documentation/formats for some colour codes. prefix is \003,
127 # no colour (\003) switches back to the term default
128 $fullString =
"$titleString\0034 $flag\00310 " .
129 "\00302$url\003 \0035*\003 \00303$user\003 \0035*\003 $szdiff \00310$comment\003\n";
143 Sanitizer::decodeCharReferences( $text )
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
$wgScript
The URL path to index.php.
Utility class for creating new RC entries.
$wgUseRCPatrol
Use RC Patrolling to check for vandalism (from recent changes and watchlists) New pages and new files...
$wgUseNPPatrol
Use new page patrolling to check new pages on Special:Newpages.
$wgCanonicalServer
Canonical URL of the server, to use in IRC feeds and notification e-mails.
$wgLocalInterwikis
Array for multiple $wgLocalInterwiki values, in case there are several interwiki prefixes that point ...
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.