Fixing a JavaScript error, cleanup.
authorRotem Liss <rotem@users.mediawiki.org>
Sun, 2 Dec 2007 18:24:20 +0000 (18:24 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Sun, 2 Dec 2007 18:24:20 +0000 (18:24 +0000)
includes/DefaultSettings.php
skins/common/block.js

index b1ea6e5..b45d271 100644 (file)
@@ -1243,7 +1243,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches don't keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '101';
+$wgStyleVersion = '102';
 
 
 # Server-side caching:
index 741dd76..78ae3bf 100644 (file)
@@ -1,4 +1,3 @@
-
 function considerChangingExpiryFocus() {
        if (!document.getElementById) {
                return;
@@ -31,26 +30,23 @@ function updateBlockOptions() {
        var isEmpty = addy.match(/^\s*$/);
        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+)?$/);
 
-       /*
-       var anonymousCheck = document.getElementById('wpAnonOnly');
-       anonymousCheck.disabled = !isIp && !isEmpty;
-
-       var autoblockCheck = document.getElementById('wpEnableAutoblock');
-       autoblockCheck.disabled = isIp && !isEmpty;
-
-       var emailblockCheck = document.getElementById('wpEmailBan');
-       emailblockCheck.disabled = isIp && !isEmpty;
-       */
-
        var anonymousRow = document.getElementById('wpAnonOnlyRow');
-       anonymousRow.style.display = (!isIp && !isEmpty) ? 'none' : '';
+       if( anonymousRow ) {
+               anonymousRow.style.display = (!isIp && !isEmpty) ? 'none' : '';
+       }
 
        var autoblockRow = document.getElementById('wpEnableAutoblockRow');
-       autoblockRow.style.display = isIp && !isEmpty ? 'none' : '';
+       if( autoblockRow ) {
+               autoblockRow.style.display = isIp && !isEmpty ? 'none' : '';
+       }
 
        var emailblockRow = document.getElementById('wpEnableEmailBan');
-       emailblockRow.style.display = isIp && !isEmpty ? 'none' : '';
+       if( emailblockRow ) {
+               emailblockRow.style.display = isIp && !isEmpty ? 'none' : '';
+       }
        
-       var emailblockRow = document.getElementById('wpEnableHideUser');
-       emailblockRow.style.display = isIp && !isEmpty ? 'none' : '';
+       var hideuserRow = document.getElementById('wpEnableHideUser');
+       if( hideuserRow ) {
+               hideuserRow.style.display = isIp && !isEmpty ? 'none' : '';
+       }
 }