r22902 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22901‎ | r22902 | r22903 >
Date:10:07, 11 June 2007
Author:raymond
Status:old
Tags:
Comment:
Do not show blockemail checkbox when blocking an IP
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/SpecialBlockip.php (modified) (history)
  • /trunk/phase3/skins/common/block.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/block.js
@@ -22,26 +22,32 @@
2323 function updateBlockOptions() {
2424 if (!document.getElementById)
2525 return;
26 -
 26+
2727 var target = document.getElementById('mw-bi-target');
2828 if (!target)
2929 return;
30 -
 30+
3131 var addy = target.value;
3232 var isEmpty = addy.match(/^\s*$/);
3333 var isIp = addy.match(/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|:(:[0-9A-Fa-f]{1,4}){1,7}|[0-9A-Fa-f]{1,4}(:{1,2}[0-9A-Fa-f]{1,4}|::$){1,7})(\/\d+)?$/);
34 -
 34+
3535 /*
3636 var anonymousCheck = document.getElementById('wpAnonOnly');
3737 anonymousCheck.disabled = !isIp && !isEmpty;
38 -
 38+
3939 var autoblockCheck = document.getElementById('wpEnableAutoblock');
4040 autoblockCheck.disabled = isIp && !isEmpty;
 41+
 42+ var emailblockCheck = document.getElementById('wpEmailBan');
 43+ emailblockCheck.disabled = isIp && !isEmpty;
4144 */
4245
4346 var anonymousRow = document.getElementById('wpAnonOnlyRow');
4447 anonymousRow.style.display = (!isIp && !isEmpty) ? 'none' : '';
45 -
 48+
4649 var autoblockRow = document.getElementById('wpEnableAutoblockRow');
4750 autoblockRow.style.display = isIp && !isEmpty ? 'none' : '';
 51+
 52+ var emailblockRow = document.getElementById('wpEnableEmailBan');
 53+ emailblockRow.style.display = isIp && !isEmpty ? 'none' : '';
4854 }
Index: trunk/phase3/includes/SpecialBlockip.php
@@ -245,7 +245,7 @@
246246
247247 if ( $wgSysopEmailBans && $wgUser->isAllowed( 'blockemail' ) ) {
248248 $wgOut->addHTML("
249 - <tr>
 249+ <tr id='wpEnableEmailBan'>
250250 <td>&nbsp;</td>
251251 <td>
252252 " . wfCheckLabel( wfMsgHtml( 'ipbemailban' ),
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1182,7 +1182,7 @@
11831183 * to ensure that client-side caches don't keep obsolete copies of global
11841184 * styles.
11851185 */
1186 -$wgStyleVersion = '75';
 1186+$wgStyleVersion = '76';
11871187
11881188
11891189 # Server-side caching:

Follow-up revisions

RevisionCommit summaryAuthorDate
r22919Merged revisions 22878-22918 via svnmerge from...david00:00, 12 June 2007

Status & tagging log