r23453 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23452‎ | r23453 | r23454 >
Date:05:12, 27 June 2007
Author:robchurch
Status:old
Tags:
Comment:
Fix LogFormatter::getAppender()
Modified paths:
  • /branches/robchurch/logs/includes/LogFormatter.php (modified) (history)

Diff [purge]

Index: branches/robchurch/logs/includes/LogFormatter.php
@@ -54,11 +54,9 @@
5555 $parts[] = $skin->userLink( $item->getUser()->getId(), $item->getUser()->getName() )
5656 . $skin->userToolLinks( $item->getUser()->getId(), $item->getUser()->getName() );
5757 # Action
58 - $parts[] = wfMsgExt(
59 - $wgLogActions[ $item->getActionKey() ],
60 - array( 'parseinline', 'replaceafter' ),
61 - $skin->makeLinkObj( $item->getTarget() )
62 - );
 58+ $params = $item->getParameters();
 59+ array_unshift( $params, $skin->makeLinkObj( $item->getTarget() ) );
 60+ $parts[] = wfMsgReal( $wgLogActions[ $item->getActionKey() ], $params );
6361 # Custom appended bits
6462 if( ( $appender = self::getAppender( $item ) ) !== false )
6563 $parts[] .= call_user_func( $appender, $item );
@@ -89,9 +87,9 @@
9088 * @return mixed
9189 */
9290 private static function getAppender( $item ) {
93 - global $wgLogAppenders;
94 - return isset( $wgLogAppenders[ $item->getType() ] )
95 - ? $wgLogAppenders[ $item->getType() ]
 91+ global $wgLogFormatAppenders;
 92+ return isset( $wgLogFormatAppenders[ $item->getType() ] )
 93+ ? $wgLogFormatAppenders[ $item->getType() ]
9694 : false;
9795 }
9896

Status & tagging log