),
'Options' => array(
'type' => 'multiselect',
- 'options' => array(
- $this->msg( 'blocklist-userblocks' )->text() => 'userblocks',
- $this->msg( 'blocklist-tempblocks' )->text() => 'tempblocks',
- $this->msg( 'blocklist-addressblocks' )->text() => 'addressblocks',
- $this->msg( 'blocklist-rangeblocks' )->text() => 'rangeblocks',
+ 'options-messages' => array(
+ 'blocklist-userblocks' => 'userblocks',
+ 'blocklist-tempblocks' => 'tempblocks',
+ 'blocklist-addressblocks' => 'addressblocks',
+ 'blocklist-rangeblocks' => 'rangeblocks',
),
'flatlist' => true,
),
function formatValue( $name, $value ) {
static $msg = null;
if ( $msg === null ) {
- $msg = array(
+ $keys = array(
'anononlyblock',
'createaccountblock',
'noautoblockblock',
'unblocklink',
'change-blocklink',
);
- $msg = array_combine( $msg, array_map( array( $this, 'msg' ), $msg ) );
+
+ foreach ( $keys as $key ) {
+ $msg[$key] = $this->msg( $key )->escaped();
+ }
}
/** @var $row object */
$row = $this->mCurrentRow;
+ $language = $this->getLanguage();
+
$formatted = '';
switch ( $name ) {
case 'ipb_timestamp':
- $formatted = $this->getLanguage()->userTimeAndDate( $value, $this->getUser() );
+ $formatted = htmlspecialchars( $language->userTimeAndDate( $value, $this->getUser() ) );
break;
case 'ipb_target':
break;
case 'ipb_expiry':
- $formatted = $this->getLanguage()->formatExpiry( $value, /* User preference timezone */true );
+ $formatted = htmlspecialchars( $language->formatExpiry(
+ $value,
+ /* User preference timezone */true
+ ) );
if ( $this->getUser()->isAllowed( 'block' ) ) {
if ( $row->ipb_auto ) {
$links[] = Linker::linkKnown(
'span',
array( 'class' => 'mw-blocklist-actions' ),
$this->msg( 'parentheses' )->rawParams(
- $this->getLanguage()->pipeList( $links ) )->escaped()
+ $language->pipeList( $links ) )->escaped()
);
}
break;
$properties[] = $msg['blocklist-nousertalk'];
}
- $formatted = $this->getLanguage()->commaList( $properties );
+ $formatted = $language->commaList( $properties );
break;
default: