From: Chad Horohoe Date: Tue, 10 Jun 2008 13:56:35 +0000 (+0000) Subject: (bug 14132) Allow user to disable bot edits from being output to UDP. X-Git-Tag: 1.31.0-rc.0~47068 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=226d93340bf6ee2215c0b253020106934269c4de;p=lhc%2Fweb%2Fwiklou.git (bug 14132) Allow user to disable bot edits from being output to UDP. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ede6278a1f..074856e423 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index aabc875776..748aa5eb61 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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. diff --git a/includes/RecentChange.php b/includes/RecentChange.php index f2e49d43e9..58180bfa83 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -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();