} else {
$details = '';
array_unshift( $params, $titleLink );
- if ( $key == 'block/block' || $key == 'suppress/block' || $key == 'block/reblock' ) {
+ if ( preg_match( '/^(block|suppress)\/(block|reblock)$/', $key ) ) {
if ( $skin ) {
$params[1] = '<span title="' . htmlspecialchars( $params[1] ). '">' .
$wgLang->translateBlockExpiry( $params[1] ) . '</span>';
$this->BlockEmail, isset( $this->BlockAllowUsertalk ) ? $this->BlockAllowUsertalk : $wgBlockAllowsUTEdit
);
+ # Should this be privately logged?
+ $suppressLog = (bool)$this->BlockHideName;
if ( wfRunHooks('BlockIp', array(&$block, &$wgUser)) ) {
if ( !$block->insert() ) {
if( $block->equals( $currentBlock ) ) {
return array( 'ipb_already_blocked' );
}
+ $suppressLog = $suppressLog || (bool)$currentBlock->mHideName;
$currentBlock->delete();
$block->insert();
$log_action = 'reblock';
$logParams[] = $this->blockLogFlags();
# Make log entry, if the name is hidden, put it in the oversight log
- $log_type = ($this->BlockHideName) ? 'suppress' : 'block';
+ $log_type = $suppressLog ? 'suppress' : 'block';
$log = new LogPage( $log_type );
$log->addEntry( $log_action, Title::makeTitle( NS_USER, $this->BlockAddress ),
$reasonstr, $logParams );
$flags[] = 'noemail';
if ( !$this->BlockAllowUsertalk && $wgBlockAllowsUTEdit )
$flags[] = 'nousertalk';
+ if ( $this->BlockHideName )
+ $flags[] = 'hiddenname';
return implode( ',', $flags );
}
'block-log-flags-noemail' => 'e-mail blocked',
'block-log-flags-nousertalk' => 'cannot edit own talk page',
'block-log-flags-angry-autoblock' => 'enhanced autoblock enabled',
+'block-log-flags-hiddenname' => 'username hidden',
'range_block_disabled' => 'The administrator ability to create range blocks is disabled.',
'ipb_expiry_invalid' => 'Expiry time invalid.',
'ipb_expiry_temp' => 'Hidden username blocks must be permanent.',
'block-log-flags-noemail',
'block-log-flags-nousertalk',
'block-log-flags-angry-autoblock',
+ 'block-log-flags-hiddenname',
'range_block_disabled',
'ipb_expiry_invalid',
'ipb_expiry_temp',