Change-Id: I2e3773e22c78370e6ca1de49e7b0976b68d8d76b
'BlockIp': Before an IP address or user is blocked.
$block: the Block object about to be saved
$user: the user _doing_ the block (not the one being blocked)
+&$reason: if the hook is aborted, the error message to be returned in an array
'BlockIpComplete': After an IP address or user is blocked.
$block: the Block object that was saved
$block->isAutoblocking( $data['AutoBlock'] );
$block->mHideName = $data['HideUser'];
- if ( !wfRunHooks( 'BlockIp', array( &$block, &$performer ) ) ) {
- return array( 'hookaborted' );
+ $reason = array( 'hookaborted' );
+ if ( !wfRunHooks( 'BlockIp', array( &$block, &$performer, &$reason ) ) ) {
+ return $reason;
}
# Try to insert block. Is there a conflicting block?