Index: trunk/phase3/includes/RecentChange.php |
— | — | @@ -158,10 +158,10 @@ |
159 | 159 | |
160 | 160 | /** |
161 | 161 | * Writes the data in this object to the database |
| 162 | + * @param $noudp bool |
162 | 163 | */ |
163 | | - public function save() { |
164 | | - global $wgLocalInterwiki, $wgPutIPinRC, $wgRC2UDPAddress, $wgRC2UDPOmitBots; |
165 | | - $fname = 'RecentChange::save'; |
| 164 | + public function save( $noudp = false ) { |
| 165 | + global $wgLocalInterwiki, $wgPutIPinRC; |
166 | 166 | |
167 | 167 | $dbw = wfGetDB( DB_MASTER ); |
168 | 168 | if( !is_array($this->mExtra) ) { |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | } |
191 | 191 | |
192 | 192 | # Insert new row |
193 | | - $dbw->insert( 'recentchanges', $this->mAttribs, $fname ); |
| 193 | + $dbw->insert( 'recentchanges', $this->mAttribs, __METHOD__ ); |
194 | 194 | |
195 | 195 | # Set the ID |
196 | 196 | $this->mAttribs['rc_id'] = $dbw->insertId(); |
— | — | @@ -198,8 +198,8 @@ |
199 | 199 | wfRunHooks( 'RecentChange_save', array( &$this ) ); |
200 | 200 | |
201 | 201 | # Notify external application via UDP |
202 | | - if( $wgRC2UDPAddress && ( !$this->mAttribs['rc_bot'] || !$wgRC2UDPOmitBots ) ) { |
203 | | - self::sendToUDP( $this->getIRCLine() ); |
| 202 | + if ( !$noudp ) { |
| 203 | + $this->notifyRC2UDP() |
204 | 204 | } |
205 | 205 | |
206 | 206 | # E-mail notifications |
Index: trunk/phase3/includes/logging/LogEntry.php |
— | — | @@ -417,7 +417,7 @@ |
418 | 418 | ); |
419 | 419 | |
420 | 420 | if ( $to === 'rc' || $to === 'rcandudp' ) { |
421 | | - $rc->save(); |
| 421 | + $rc->save( 'pleasedontudp' ); |
422 | 422 | } |
423 | 423 | |
424 | 424 | if ( $to === 'udp' || $to === 'rcandudp' ) { |