Use new notifyRC2UDP() function in LogPage to avoid duplicated code
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 15 Jan 2009 01:42:11 +0000 (01:42 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 15 Jan 2009 01:42:11 +0000 (01:42 +0000)
includes/LogPage.php

index 1950b02..a6afbd7 100644 (file)
@@ -86,13 +86,10 @@ class LogPage {
                        }
                        # Notify external application via UDP.
                        # We send this to IRC but do not want to add it the RC table.
                        }
                        # 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 );
                        $rc = RecentChange::newLogEntry( $now, $titleObj, $this->doer, $this->getRcComment(), '',
                                $this->type, $this->action, $this->target, $this->comment, $this->params, $newId );
                        $titleObj = SpecialPage::getTitleFor( 'Log', $this->type );
                        $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() );
-                       }
+                       $rc->notifyRC2UDP();
                }
                return true;
        }
                }
                return true;
        }