Revision: 46119
Author:   aaron
Date:     2009-01-24 06:01:59 +0000 (Sat, 24 Jan 2009)

Log Message:
-----------
(bug 14423) Check flag validity for logging

Modified Paths:
--------------
    trunk/phase3/includes/specials/SpecialBlockip.php

Modified: trunk/phase3/includes/specials/SpecialBlockip.php
===================================================================
--- trunk/phase3/includes/specials/SpecialBlockip.php   2009-01-24 05:37:43 UTC 
(rev 46118)
+++ trunk/phase3/includes/specials/SpecialBlockip.php   2009-01-24 06:01:59 UTC 
(rev 46119)
@@ -404,7 +404,8 @@
                $block = new Block( $this->BlockAddress, $userId, 
$wgUser->getId(),
                        $reasonstr, wfTimestampNow(), 0, $expiry, 
$this->BlockAnonOnly,
                        $this->BlockCreateAccount, $this->BlockEnableAutoblock, 
$this->BlockHideName,
-                       $this->BlockEmail, isset( $this->BlockAllowUsertalk ) ? 
$this->BlockAllowUsertalk : $wgBlockAllowsUTEdit );
+                       $this->BlockEmail, isset( $this->BlockAllowUsertalk ) ? 
$this->BlockAllowUsertalk : $wgBlockAllowsUTEdit
+               );
 
                if ( wfRunHooks('BlockIp', array(&$block, &$wgUser)) ) {
 
@@ -430,6 +431,10 @@
                        if ( $this->BlockWatchUser ) { 
                                $wgUser->addWatch ( Title::makeTitle( NS_USER, 
$this->BlockAddress ) );
                        }
+                       
+                       # Block constructor sanitizes certain block options on 
insert
+                       $this->BlockEmail = $block->mBlockEmail;
+                       $this->BlockEnableAutoblock = $block->mEnableAutoblock;
 
                        # Prepare log parameters
                        $logParams = array();
@@ -500,7 +505,7 @@
                global $wgBlockAllowsUTEdit;
                $flags = array();
                if( $this->BlockAnonOnly && IP::isIPAddress( 
$this->BlockAddress ) )
-                                       // when blocking a user the option 
'anononly' is not available/has no effect -> do not write this into log
+                       // when blocking a user the option 'anononly' is not 
available/has no effect -> do not write this into log
                        $flags[] = 'anononly';
                if( $this->BlockCreateAccount )
                        $flags[] = 'nocreate';



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to