(bug 14132) Allow user to disable bot edits from being output to UDP.
authorChad Horohoe <demon@users.mediawiki.org>
Tue, 10 Jun 2008 13:56:35 +0000 (13:56 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Tue, 10 Jun 2008 13:56:35 +0000 (13:56 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/RecentChange.php

index ede6278..074856e 100644 (file)
@@ -56,6 +56,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   $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 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   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 ===
 
index aabc875..748aa5e 100644 (file)
@@ -1944,6 +1944,7 @@ $wgRCLinkDays   = array( 1, 3, 7, 14, 30 );
 $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 f2e49d4..58180bf 100644 (file)
@@ -140,7 +140,8 @@ class RecentChange
        # 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 @@ class RecentChange
                }
 
                # 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();