MediaWiki r36148 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r36147‎ | r36148 (on ViewVC)‎ | r36149 >
Date:13:56, 10 June 2008
Author:demon
Status:old
Tags:
Comment:
(bug 14132) Allow user to disable bot edits from being output to UDP.
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
===================================================================
--- trunk/phase3/includes/RecentChange.php	(revision 36147)
+++ trunk/phase3/includes/RecentChange.php	(revision 36148)
@@ -140,7 +140,8 @@
 	# Writes the data in this object to the database
 	function save()
 	{
-		global $wgLocalInterwiki, $wgPutIPinRC, $wgRC2UDPAddress, $wgRC2UDPPort, $wgRC2UDPPrefix;
+		global $wgLocalInterwiki, $wgPutIPinRC, $wgRC2UDPAddress, 
+		$wgRC2UDPPort, $wgRC2UDPPrefix, $wgRC2UDPOmitBots;
 		$fname = 'RecentChange::save';
 
 		$dbw = wfGetDB( DB_MASTER );
@@ -209,7 +210,7 @@
 		}
 
 		# Notify external application via UDP
-		if ( $wgRC2UDPAddress ) {
+		if ( $wgRC2UDPAddress && ( !$this->mAttribs['rc_bot'] || !$wgRC2UDPOmitBots ) ) {
 			$conn = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP );
 			if ( $conn ) {
 				$line = $wgRC2UDPPrefix . $this->getIRCLine();
Index: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php	(revision 36147)
+++ trunk/phase3/includes/DefaultSettings.php	(revision 36148)
@@ -1944,6 +1944,7 @@
 $wgRC2UDPAddress = false;
 $wgRC2UDPPort = false;
 $wgRC2UDPPrefix = '';
+$wgRC2UDPOmitBots = false;
 
 # Enable user search in Special:Newpages
 # This is really a temporary hack around an index install bug on some Wikipedias.
Index: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES	(revision 36147)
+++ trunk/phase3/RELEASE-NOTES	(revision 36148)
@@ -56,6 +56,7 @@
   $wgGroupPermissions[]['noratelimit']. The former still works, however.
 * New $wgGroupPermissions option 'move-subpages' added to control bulk-moving
   subpages along with pages.  Assigned to 'user' and 'sysop' by default.
+* New $wgRC2UDPOmitBots allows user to omit bot edits from UDP output. Default: false
 
 === New features in 1.13 ===
 
@@ -149,6 +150,7 @@
   changed by extensions.
 * Add a new hook LinkerMakeExternalLink to allow extensions to modify the output of
   external links.
+* (bug 14132) Allow user to disable bot edits from being output to UDP. 
   
 === Bug fixes in 1.13 ===
 

Status & tagging log

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