r45612 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45611‎ | r45612 | r45613 >
Date:18:44, 9 January 2009
Author:aaron
Status:ok
Tags:
Comment:
Check $wgLogRestrictions for udp-only case
Modified paths:
  • /trunk/phase3/includes/LogPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LogPage.php
@@ -81,16 +81,18 @@
8282 # And update recentchanges
8383 if( $this->updateRecentChanges ) {
8484 $titleObj = SpecialPage::getTitleFor( 'Log', $this->type );
85 - $rcComment = $this->getRcComment();
86 - RecentChange::notifyLog( $now, $titleObj, $this->doer, $rcComment, '', $this->type,
 85+ RecentChange::notifyLog( $now, $titleObj, $this->doer, $this->getRcComment(), '', $this->type,
8786 $this->action, $this->target, $this->comment, $this->params, $newId );
8887 } else if( $this->sendToUDP ) {
 88+ # Don't send private logs to UDP
 89+ if( isset($wgLogRestrictions[$this->type]) && $wgLogRestrictions[$this->type] !='*' ) {
 90+ return true;
 91+ }
8992 # Notify external application via UDP.
9093 # We send this to IRC but do not want to add it the RC table.
9194 global $wgRC2UDPAddress, $wgRC2UDPOmitBots;
9295 $titleObj = SpecialPage::getTitleFor( 'Log', $this->type );
93 - $rcComment = $this->getRcComment();
94 - $rc = RecentChange::newLogEntry( $now, $titleObj, $this->doer, $rcComment, '',
 96+ $rc = RecentChange::newLogEntry( $now, $titleObj, $this->doer, $this->getRcComment(), '',
9597 $this->type, $this->action, $this->target, $this->comment, $this->params, $newId );
9698 if( $wgRC2UDPAddress && ( !$rc->getAttribute('rc_bot') || !$wgRC2UDPOmitBots ) ) {
9799 RecentChange::sendToUDP( $rc->getIRCLine() );

Status & tagging log