r112070 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112069‎ | r112070 | r112071 >
Date:00:26, 22 February 2012
Author:aaron
Status:ok
Tags:
Comment:
Made use of new getIRCActionComment() function so that comments are back in IRC lines.
Modified paths:
  • /trunk/phase3/includes/logging/LogEntry.php (modified) (history)
  • /trunk/phase3/includes/logging/LogFormatter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/logging/LogEntry.php
@@ -470,7 +470,7 @@
471471 $this->getComment(),
472472 serialize( (array) $this->getParameters() ),
473473 $newId,
474 - $formatter->getIRCActionText() // Used for IRC feeds
 474+ $formatter->getIRCActionComment() // Used for IRC feeds
475475 );
476476
477477 if ( $to === 'rc' || $to === 'rcandudp' ) {
Index: trunk/phase3/includes/logging/LogFormatter.php
@@ -148,7 +148,28 @@
149149 * @see getActionText()
150150 * @return string text
151151 */
152 - public function getIRCActionText() {
 152+ public function getIRCActionComment() {
 153+ $actionComment = $this->getIRCActionText();
 154+ $comment = $this->entry->getComment();
 155+
 156+ if ( $comment != '' ) {
 157+ if ( $actionComment == '' ) {
 158+ $actionComment = $comment;
 159+ } else {
 160+ $actionComment .= wfMsgForContent( 'colon-separator' ) . $comment;
 161+ }
 162+ }
 163+
 164+ return $actionComment;
 165+ }
 166+
 167+ /**
 168+ * Even uglier hack to maintain backwards compatibilty with IRC bots
 169+ * (bug 34508).
 170+ * @see getActionText()
 171+ * @return string text
 172+ */
 173+ protected function getIRCActionText() {
153174 $this->plaintext = true;
154175 $text = $this->getActionText();
155176

Follow-up revisions

RevisionCommit summaryAuthorDate
r112073MFT r112045, r112046, r112049, r112061, r112062, r112063, r112065, r112066, r...reedy00:54, 22 February 2012

Status & tagging log