From: Aaron Schulz Date: Wed, 22 Feb 2012 00:26:29 +0000 (+0000) Subject: Made use of new getIRCActionComment() function so that comments are back in IRC lines. X-Git-Tag: 1.31.0-rc.0~24576 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=f5d3d02a982473726c9b96e1280dd75d765dc9dc;p=lhc%2Fweb%2Fwiklou.git Made use of new getIRCActionComment() function so that comments are back in IRC lines. --- diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php index 327eb24fcb..5883216a67 100644 --- a/includes/logging/LogEntry.php +++ b/includes/logging/LogEntry.php @@ -470,7 +470,7 @@ class ManualLogEntry extends LogEntryBase { $this->getComment(), serialize( (array) $this->getParameters() ), $newId, - $formatter->getIRCActionText() // Used for IRC feeds + $formatter->getIRCActionComment() // Used for IRC feeds ); if ( $to === 'rc' || $to === 'rcandudp' ) { diff --git a/includes/logging/LogFormatter.php b/includes/logging/LogFormatter.php index 769e6b6891..798b9f7566 100644 --- a/includes/logging/LogFormatter.php +++ b/includes/logging/LogFormatter.php @@ -148,7 +148,28 @@ class LogFormatter { * @see getActionText() * @return string text */ - public function getIRCActionText() { + public function getIRCActionComment() { + $actionComment = $this->getIRCActionText(); + $comment = $this->entry->getComment(); + + if ( $comment != '' ) { + if ( $actionComment == '' ) { + $actionComment = $comment; + } else { + $actionComment .= wfMsgForContent( 'colon-separator' ) . $comment; + } + } + + return $actionComment; + } + + /** + * Even uglier hack to maintain backwards compatibilty with IRC bots + * (bug 34508). + * @see getActionText() + * @return string text + */ + protected function getIRCActionText() { $this->plaintext = true; $text = $this->getActionText();