MediaWiki r42751 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r42750‎ | r42751 (on ViewVC)‎ | 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:

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
===================================================================
--- trunk/phase3/includes/RecentChange.php	(revision 42750)
+++ trunk/phase3/includes/RecentChange.php	(revision 42751)
@@ -589,7 +589,7 @@
 	}
 
 	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 @@
 			$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;
Index: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php	(revision 42750)
+++ trunk/phase3/includes/DefaultSettings.php	(revision 42751)
@@ -2048,6 +2048,7 @@
 $wgRC2UDPAddress = false;
 $wgRC2UDPPort = false;
 $wgRC2UDPPrefix = '';
+$wgRC2UDPInterwikiPrefix = false;
 $wgRC2UDPOmitBots = false;
 
 /**

Status & tagging log

  • 15:36, 12 September 2011 Meno25 (Talk | contribs) changed the status of r42751 [removed: ok added: old]
Personal tools
Namespaces
Variants
Views
Actions
Site
Support
Download
Development
Communication
Toolbox