r80393 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80392‎ | r80393 | r80394 >
Date:12:46, 15 January 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Fix mistake in r80248 and restructure a bit
Modified paths:
  • /trunk/phase3/includes/LogPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LogPage.php
@@ -514,11 +514,15 @@
515515 public static function formatBlockFlag( $flag, $forContent = false ) {
516516 static $messages = array();
517517 if( !isset( $messages[$flag] ) ) {
 518+ $messages[$flag] = htmlspecialchars( $flag ); // Fallback
 519+
518520 $msg = wfMessage( 'block-log-flags-' . $flag );
519521 if ( $forContent ) {
520 - $msg = $msg->inContentLanguage();
 522+ $msg->inContentLanguage();
521523 }
522 - $messages[$flag] = htmlspecialchars( !$msg->exists() ? $flag : $msg );
 524+ if ( $msg->exists() ) {
 525+ $messages[$flag] = $msg->escaped();
 526+ }
523527 }
524528 return $messages[$flag];
525529 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80248Implement Message::isBlank and Message::isDisabled....dantman10:51, 14 January 2011

Status & tagging log