r42751 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42750‎ | r42751 | r42752 >
Date:22:19, 28 October 2008
Author:charlie
Status:old
Tags:
Comment:
Added a new configuration setting called $wgRC2UDPInterwikiPrefix that will
prefix the page name in the UDP feed with the Interwiki prefix specified
in the $wgLocalInterwiki variable.
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/RecentChange.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
@@ -589,7 +589,7 @@
590590 }
591591
592592 protected function getIRCLine() {
593 - global $wgUseRCPatrol;
 593+ global $wgUseRCPatrol, $wgRC2UDPInterwikiPrefix, $wgLocalInterwiki;
594594
595595 // FIXME: Would be good to replace these 2 extract() calls with something more explicit
596596 // e.g. list ($rc_type, $rc_id) = array_values ($this->mAttribs); [or something like that]
@@ -641,9 +641,16 @@
642642 $comment = self::cleanupForIRC( $rc_comment );
643643 $flag = ($rc_new ? "N" : "") . ($rc_minor ? "M" : "") . ($rc_bot ? "B" : "");
644644 }
 645+
 646+ if( $wgRC2UDPInterwikiPrefix && isset( $wgLocalInterwiki ) ) {
 647+ $titleString = "\00314[[\00303$wgLocalInterwiki:\00307$title\00314]]";
 648+ } else {
 649+ $titleString = "\00314[[\00307$title\00314]]";
 650+ }
 651+
645652 # see http://www.irssi.org/documentation/formats for some colour codes. prefix is \003,
646653 # no colour (\003) switches back to the term default
647 - $fullString = "\00314[[\00307$title\00314]]\0034 $flag\00310 " .
 654+ $fullString = "$titleString\0034 $flag\00310 " .
648655 "\00302$url\003 \0035*\003 \00303$user\003 \0035*\003 $szdiff \00310$comment\003\n";
649656
650657 return $fullString;
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2048,6 +2048,7 @@
20492049 $wgRC2UDPAddress = false;
20502050 $wgRC2UDPPort = false;
20512051 $wgRC2UDPPrefix = '';
 2052+$wgRC2UDPInterwikiPrefix = false;
20522053 $wgRC2UDPOmitBots = false;
20532054
20542055 /**

Status & tagging log