Fix mistake in r80248 and restructure a bit
This commit is contained in:
parent
771701eeef
commit
fe6efad016
1 changed files with 6 additions and 2 deletions
|
|
@ -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];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue