From: Charles Melbye Date: Tue, 28 Oct 2008 22:19:30 +0000 (+0000) Subject: Added a new configuration setting called $wgRC2UDPInterwikiPrefix that will X-Git-Tag: 1.31.0-rc.0~44524 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=1f4d29361e0b7718ac63e000e6fd588f4258a3d0;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 76b4071fb6..7e75847d41 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2048,6 +2048,7 @@ $wgRCLinkDays = array( 1, 3, 7, 14, 30 ); $wgRC2UDPAddress = false; $wgRC2UDPPort = false; $wgRC2UDPPrefix = ''; +$wgRC2UDPInterwikiPrefix = false; $wgRC2UDPOmitBots = false; /** diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 6b47df7651..8b61a9cd6f 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -589,7 +589,7 @@ class RecentChange } protected function getIRCLine() { - global $wgUseRCPatrol; + global $wgUseRCPatrol, $wgRC2UDPInterwikiPrefix, $wgLocalInterwiki; // FIXME: Would be good to replace these 2 extract() calls with something more explicit // e.g. list ($rc_type, $rc_id) = array_values ($this->mAttribs); [or something like that] @@ -641,9 +641,16 @@ class RecentChange $comment = self::cleanupForIRC( $rc_comment ); $flag = ($rc_new ? "N" : "") . ($rc_minor ? "M" : "") . ($rc_bot ? "B" : ""); } + + if( $wgRC2UDPInterwikiPrefix && isset( $wgLocalInterwiki ) ) { + $titleString = "\00314[[\00303$wgLocalInterwiki:\00307$title\00314]]"; + } else { + $titleString = "\00314[[\00307$title\00314]]"; + } + # see http://www.irssi.org/documentation/formats for some colour codes. prefix is \003, # no colour (\003) switches back to the term default - $fullString = "\00314[[\00307$title\00314]]\0034 $flag\00310 " . + $fullString = "$titleString\0034 $flag\00310 " . "\00302$url\003 \0035*\003 \00303$user\003 \0035*\003 $szdiff \00310$comment\003\n"; return $fullString;