Index: branches/robchurch/logs/includes/CoreLogFormatter.php |
— | — | @@ -12,29 +12,26 @@ |
13 | 13 | /** |
14 | 14 | * Build the action text for a move log item |
15 | 15 | * |
16 | | - * @param LogItem $item Item to format |
| 16 | + * @param LogItem $item Log item to format |
| 17 | + * @param Skin $skin Skin to use for link building, etc. |
17 | 18 | * @return string |
18 | 19 | */ |
19 | | - public static function formatMove( $item ) { |
20 | | - global $wgUser; |
21 | | - $skin = $wgUser->getSkin(); |
| 20 | + public static function formatMove( $item, $skin ) { |
22 | 21 | $data = $item->getParameters(); |
23 | | - |
24 | 22 | $params[] = $skin->makeLinkObj( $item->getTarget(), '', 'redirect=no' ); |
25 | 23 | $params[] = $skin->makeLinkObj( Title::newFromText( $data[0] ) ); |
26 | | - |
27 | 24 | return LogFormatter::getActionText( $item, $params ); |
28 | 25 | } |
29 | 26 | |
30 | 27 | /** |
31 | 28 | * Build the action text for a user rights log item |
32 | 29 | * |
33 | | - * @param LogItem $item Item to format |
| 30 | + * @param LogItem $item Log item to format |
| 31 | + * @param Skin $skin Skin to use for link building, etc. |
34 | 32 | * @return string |
35 | 33 | */ |
36 | | - public static function formatRights( $item ) { |
37 | | - global $wgUser, $wgContLang; |
38 | | - $skin = $wgUser->getSkin(); |
| 34 | + public static function formatRights( $item, $skin ) { |
| 35 | + global $wgContLang; |
39 | 36 | $target = $wgContLang->ucfirst( $item->getTarget()->getText() ); |
40 | 37 | $data = $item->getParameters(); |
41 | 38 | |
Index: branches/robchurch/logs/includes/BlockLogFormatter.php |
— | — | @@ -17,12 +17,12 @@ |
18 | 18 | /** |
19 | 19 | * Build the action text for a block log item |
20 | 20 | * |
21 | | - * @param LogItem $item |
| 21 | + * @param LogItem $item Log item to format |
| 22 | + * @param Skin $skin Skin to use for link building, etc. |
22 | 23 | * @return string |
23 | 24 | */ |
24 | | - public static function makeActionText( $item ) { |
| 25 | + public static function makeActionText( $item, $skin ) { |
25 | 26 | global $wgUser, $wgLang, $wgLogActions; |
26 | | - $skin = $wgUser->getSkin(); |
27 | 27 | $data = $item->getParameters(); |
28 | 28 | |
29 | 29 | # Target link |
Index: branches/robchurch/logs/includes/LogFormatter.php |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | # Action |
58 | 58 | if( ( $callback = self::getActionCallback( $item ) ) !== false ) { |
59 | 59 | # Custom action text callback |
60 | | - $parts[] = call_user_func( $callback, $item ); |
| 60 | + $parts[] = call_user_func( $callback, $item, $skin ); |
61 | 61 | } else { |
62 | 62 | # Use the message |
63 | 63 | $params = $item->getParameters(); |