From: Niklas Laxström Date: Sat, 15 Jan 2011 12:46:37 +0000 (+0000) Subject: Fix mistake in r80248 and restructure a bit X-Git-Tag: 1.31.0-rc.0~32522 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=fe6efad016084b8161aa454d7ab6d1131309207e;p=lhc%2Fweb%2Fwiklou.git Fix mistake in r80248 and restructure a bit --- diff --git a/includes/LogPage.php b/includes/LogPage.php index 8c47665a02..54595a2ae7 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -514,11 +514,15 @@ class LogPage { public static function formatBlockFlag( $flag, $forContent = false ) { static $messages = array(); if( !isset( $messages[$flag] ) ) { + $messages[$flag] = htmlspecialchars( $flag ); // Fallback + $msg = wfMessage( 'block-log-flags-' . $flag ); if ( $forContent ) { - $msg = $msg->inContentLanguage(); + $msg->inContentLanguage(); + } + if ( $msg->exists() ) { + $messages[$flag] = $msg->escaped(); } - $messages[$flag] = htmlspecialchars( !$msg->exists() ? $flag : $msg ); } return $messages[$flag]; }