Made use of new getIRCActionComment() function so that comments are back in IRC lines.
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 22 Feb 2012 00:26:29 +0000 (00:26 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 22 Feb 2012 00:26:29 +0000 (00:26 +0000)
includes/logging/LogEntry.php
includes/logging/LogFormatter.php

index 327eb24..5883216 100644 (file)
@@ -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' ) {
index 769e6b6..798b9f7 100644 (file)
@@ -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();