$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)) ) {
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();
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';