From f5d3d02a982473726c9b96e1280dd75d765dc9dc Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 22 Feb 2012 00:26:29 +0000 Subject: [PATCH] Made use of new getIRCActionComment() function so that comments are back in IRC lines. --- includes/logging/LogEntry.php | 2 +- includes/logging/LogFormatter.php | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) 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(); -- 2.20.1