From 26ead265aaa440b24c63d3cd110282ef344c585f Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 9 Jan 2009 18:44:52 +0000 Subject: [PATCH] Check $wgLogRestrictions for udp-only case --- includes/LogPage.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/LogPage.php b/includes/LogPage.php index 80280fbe52..f0220a9dd3 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -81,16 +81,18 @@ class LogPage { # And update recentchanges if( $this->updateRecentChanges ) { $titleObj = SpecialPage::getTitleFor( 'Log', $this->type ); - $rcComment = $this->getRcComment(); - RecentChange::notifyLog( $now, $titleObj, $this->doer, $rcComment, '', $this->type, + RecentChange::notifyLog( $now, $titleObj, $this->doer, $this->getRcComment(), '', $this->type, $this->action, $this->target, $this->comment, $this->params, $newId ); } else if( $this->sendToUDP ) { + # Don't send private logs to UDP + if( isset($wgLogRestrictions[$this->type]) && $wgLogRestrictions[$this->type] !='*' ) { + return true; + } # Notify external application via UDP. # We send this to IRC but do not want to add it the RC table. global $wgRC2UDPAddress, $wgRC2UDPOmitBots; $titleObj = SpecialPage::getTitleFor( 'Log', $this->type ); - $rcComment = $this->getRcComment(); - $rc = RecentChange::newLogEntry( $now, $titleObj, $this->doer, $rcComment, '', + $rc = RecentChange::newLogEntry( $now, $titleObj, $this->doer, $this->getRcComment(), '', $this->type, $this->action, $this->target, $this->comment, $this->params, $newId ); if( $wgRC2UDPAddress && ( !$rc->getAttribute('rc_bot') || !$wgRC2UDPOmitBots ) ) { RecentChange::sendToUDP( $rc->getIRCLine() ); -- 2.20.1