From 086ae52d12011746a75f5588e877347bc0457352 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 21 Mar 2008 11:49:34 +0100 Subject: Update auf MediaWiki 1.12.0 --- includes/LogPage.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'includes/LogPage.php') diff --git a/includes/LogPage.php b/includes/LogPage.php index 8982b59f..7c89df76 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -116,9 +116,10 @@ class LogPage { * @static */ public static function logName( $type ) { - global $wgLogNames; + global $wgLogNames, $wgMessageCache; if( isset( $wgLogNames[$type] ) ) { + $wgMessageCache->loadAllMessages(); return str_replace( '_', ' ', wfMsg( $wgLogNames[$type] ) ); } else { // Bogus log types? Perhaps an extension was removed. @@ -138,7 +139,7 @@ class LogPage { /** * @static */ - static function actionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false, $translate=false ) { + static function actionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false ) { global $wgLang, $wgContLang, $wgLogActions; $key = "$type/$action"; @@ -172,6 +173,11 @@ class LogPage { $text = $wgContLang->ucfirst( $title->getText() ); $titleLink = $skin->makeLinkObj( Title::makeTitle( NS_USER, $text ) ); break; + case 'merge': + $titleLink = $skin->makeLinkObj( $title, $title->getPrefixedText(), 'redirect=no' ); + $params[0] = $skin->makeLinkObj( Title::newFromText( $params[0] ), htmlspecialchars( $params[0] ) ); + $params[1] = $wgLang->timeanddate( $params[1] ); + break; default: $titleLink = $skin->makeLinkObj( $title ); } @@ -199,8 +205,10 @@ class LogPage { } else { array_unshift( $params, $titleLink ); if ( $key == 'block/block' ) { - if ( $translate ) { - $params[1] = $wgLang->translateBlockExpiry( $params[1] ); + if ( $skin ) { + $params[1] = '' . $wgLang->translateBlockExpiry( $params[1] ) . ''; + } else { + $params[1] = $wgContLang->translateBlockExpiry( $params[1] ); } $params[2] = isset( $params[2] ) ? self::formatBlockFlags( $params[2] ) -- cgit v1.2.2