Page MenuHomePhabricator

diff.patch

Authored By
bzimport
Nov 21 2014, 10:11 PM
Size
2 KB
Referenced Files
None
Subscribers
None

diff.patch

Index: includes/SpecialBlockip.php
===================================================================
--- includes/SpecialBlockip.php (revision 34306)
+++ includes/SpecialBlockip.php (working copy)
@@ -62,6 +62,7 @@
$this->BlockCreateAccount = $wgRequest->getBool( 'wpCreateAccount', $byDefault );
$this->BlockEnableAutoblock = $wgRequest->getBool( 'wpEnableAutoblock', $byDefault );
$this->BlockEmail = $wgRequest->getBool( 'wpEmailBan', false );
+ $this->BlockWatchUser = $wgRequest->getBool( 'wpWatchUser', false );
# Re-check user's rights to hide names, very serious, defaults to 0
$this->BlockHideName = ( $wgRequest->getBool( 'wpHideName', 0 ) && $wgUser->isAllowed( 'hideuser' ) ) ? 1 : 0;
}
@@ -226,13 +227,25 @@
</tr>"
);
}
+
+ # Watchlist their user page?
+ $wgOut->addHTML("
+ <tr id='wpEnableWatchUser'>
+ <td>&nbsp;</td>
+ <td class='mw-input'>" .
+ Xml::checkLabel( wfMsg( 'ipbwatchuser' ),
+ 'wpWatchUser', 'wpWatchUser', $this->BlockWatchUser,
+ array( 'tabindex' => '11' ) ) . "
+ </td>
+ </tr>"
+ );
$wgOut->addHTML("
<tr>
<td style='padding-top: 1em'>&nbsp;</td>
<td class='mw-submit' style='padding-top: 1em'>" .
Xml::submitButton( wfMsg( 'ipbsubmit' ),
- array( 'name' => 'wpBlock', 'tabindex' => '11' ) ) . "
+ array( 'name' => 'wpBlock', 'tabindex' => '12' ) ) . "
</td>
</tr>" .
Xml::closeElement( 'table' ) .
@@ -349,6 +362,10 @@
$this->BlockCreateAccount, $this->BlockEnableAutoblock, $this->BlockHideName,
$this->BlockEmail);
+ if ( $this->BlockWatchUser ) {
+ $wgUser->addWatch ( Title::makeTitle( NS_USER, $this->BlockAddress ) );
+ }
+
if (wfRunHooks('BlockIp', array(&$block, &$wgUser))) {
if ( !$block->insert() ) {
Index: languages/messages/MessagesEn.php
===================================================================
--- languages/messages/MessagesEn.php (revision 34306)
+++ languages/messages/MessagesEn.php (working copy)
@@ -2284,6 +2284,7 @@
'ipbotheroption' => 'other',
'ipbotherreason' => 'Other/additional reason:',
'ipbhidename' => 'Hide username from the block log, active block list and user list',
+'ipbwatchuser' => 'Watchlist the user/user talk page of the person you are blocking?',
'badipaddress' => 'Invalid IP address',
'blockipsuccesssub' => 'Block succeeded',
'blockipsuccesstext' => '[[Special:Contributions/$1|$1]] has been blocked.<br />

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4473
Default Alt Text
diff.patch (2 KB)

Event Timeline