Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1871,6 +1871,7 @@ |
1872 | 1872 | 'block-log-flags-noemail', |
1873 | 1873 | 'block-log-flags-nousertalk', |
1874 | 1874 | 'block-log-flags-angry-autoblock', |
| 1875 | + 'block-log-flags-hiddenname', |
1875 | 1876 | 'range_block_disabled', |
1876 | 1877 | 'ipb_expiry_invalid', |
1877 | 1878 | 'ipb_expiry_temp', |
Index: trunk/phase3/includes/specials/SpecialBlockip.php |
— | — | @@ -407,6 +407,8 @@ |
408 | 408 | $this->BlockEmail, isset( $this->BlockAllowUsertalk ) ? $this->BlockAllowUsertalk : $wgBlockAllowsUTEdit |
409 | 409 | ); |
410 | 410 | |
| 411 | + # Should this be privately logged? |
| 412 | + $suppressLog = (bool)$this->BlockHideName; |
411 | 413 | if ( wfRunHooks('BlockIp', array(&$block, &$wgUser)) ) { |
412 | 414 | |
413 | 415 | if ( !$block->insert() ) { |
— | — | @@ -419,6 +421,7 @@ |
420 | 422 | if( $block->equals( $currentBlock ) ) { |
421 | 423 | return array( 'ipb_already_blocked' ); |
422 | 424 | } |
| 425 | + $suppressLog = $suppressLog || (bool)$currentBlock->mHideName; |
423 | 426 | $currentBlock->delete(); |
424 | 427 | $block->insert(); |
425 | 428 | $log_action = 'reblock'; |
— | — | @@ -444,7 +447,7 @@ |
445 | 448 | $logParams[] = $this->blockLogFlags(); |
446 | 449 | |
447 | 450 | # Make log entry, if the name is hidden, put it in the oversight log |
448 | | - $log_type = ($this->BlockHideName) ? 'suppress' : 'block'; |
| 451 | + $log_type = $suppressLog ? 'suppress' : 'block'; |
449 | 452 | $log = new LogPage( $log_type ); |
450 | 453 | $log->addEntry( $log_action, Title::makeTitle( NS_USER, $this->BlockAddress ), |
451 | 454 | $reasonstr, $logParams ); |
— | — | @@ -517,6 +520,8 @@ |
518 | 521 | $flags[] = 'noemail'; |
519 | 522 | if ( !$this->BlockAllowUsertalk && $wgBlockAllowsUTEdit ) |
520 | 523 | $flags[] = 'nousertalk'; |
| 524 | + if ( $this->BlockHideName ) |
| 525 | + $flags[] = 'hiddenname'; |
521 | 526 | return implode( ',', $flags ); |
522 | 527 | } |
523 | 528 | |
Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -201,7 +201,7 @@ |
202 | 202 | } else { |
203 | 203 | $details = ''; |
204 | 204 | array_unshift( $params, $titleLink ); |
205 | | - if ( $key == 'block/block' || $key == 'suppress/block' || $key == 'block/reblock' ) { |
| 205 | + if ( preg_match( '/^(block|suppress)\/(block|reblock)$/', $key ) ) { |
206 | 206 | if ( $skin ) { |
207 | 207 | $params[1] = '<span title="' . htmlspecialchars( $params[1] ). '">' . |
208 | 208 | $wgLang->translateBlockExpiry( $params[1] ) . '</span>'; |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2687,6 +2687,7 @@ |
2688 | 2688 | 'block-log-flags-noemail' => 'e-mail blocked', |
2689 | 2689 | 'block-log-flags-nousertalk' => 'cannot edit own talk page', |
2690 | 2690 | 'block-log-flags-angry-autoblock' => 'enhanced autoblock enabled', |
| 2691 | +'block-log-flags-hiddenname' => 'username hidden', |
2691 | 2692 | 'range_block_disabled' => 'The administrator ability to create range blocks is disabled.', |
2692 | 2693 | 'ipb_expiry_invalid' => 'Expiry time invalid.', |
2693 | 2694 | 'ipb_expiry_temp' => 'Hidden username blocks must be permanent.', |