* Log unsuppressed names in the suppress log as normal
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 14 Mar 2009 10:02:17 +0000 (10:02 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 14 Mar 2009 10:02:17 +0000 (10:02 +0000)
* Fixed reblock action display
* Add hiddenname flag and msg

includes/LogPage.php
includes/specials/SpecialBlockip.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index e4c1aa1..0d57238 100644 (file)
@@ -201,7 +201,7 @@ class LogPage {
                                } 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>';
index 5dabd97..5baec02 100644 (file)
@@ -407,6 +407,8 @@ class IPBlockForm {
                        $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() ) {
@@ -419,6 +421,7 @@ class IPBlockForm {
                                        if( $block->equals( $currentBlock ) ) {
                                                return array( 'ipb_already_blocked' );
                                        }
+                                       $suppressLog = $suppressLog || (bool)$currentBlock->mHideName;
                                        $currentBlock->delete();
                                        $block->insert();
                                        $log_action = 'reblock';
@@ -444,7 +447,7 @@ class IPBlockForm {
                        $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 );
@@ -517,6 +520,8 @@ class IPBlockForm {
                        $flags[] = 'noemail';
                if ( !$this->BlockAllowUsertalk && $wgBlockAllowsUTEdit )
                        $flags[] = 'nousertalk';
+               if ( $this->BlockHideName )
+                       $flags[] = 'hiddenname';
                return implode( ',', $flags );
        }
 
index bdc139f..64f4b02 100644 (file)
@@ -2687,6 +2687,7 @@ See the [[Special:IPBlockList|IP block list]] for the list of currently operatio
 '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.',
index e7dac26..720c777 100644 (file)
@@ -1871,6 +1871,7 @@ $wgMessageStructure = array(
                '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',