* Delay AJAX watch initialization until click so IE 6 with ugly security
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 28 Jun 2007 16:21:27 +0000 (16:21 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 28 Jun 2007 16:21:27 +0000 (16:21 +0000)
  settings doesn't prompt you until you use the link.

RELEASE-NOTES
includes/DefaultSettings.php
skins/common/ajaxwatch.js

index 61bc085..fb6b225 100644 (file)
@@ -229,6 +229,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Use native XMLHttpRequest class in preference to ActiveX on IE 7; this
   avoids the "ActiveX "Do you want to allow ActiveX?" prompt when something
   security settings are cranked this way and AJAX-y gets used.
+* Delay AJAX watch initialization until click so IE 6 with ugly security
+  settings doesn't prompt you until you use the link.
 
 
 == API changes since 1.10 ==
index d05cb5a..5bd8538 100644 (file)
@@ -1198,7 +1198,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches don't keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '79';
+$wgStyleVersion = '80';
 
 
 # Server-side caching:
index 08b947a..b30e4ff 100644 (file)
@@ -52,6 +52,14 @@ wgAjaxWatch.ajaxCall = function() {
        } else if (wgAjaxWatch.inprogress) {
                return false;
        }
+       if(!wfSupportsAjax()) {
+               // Lazy initialization so we don't toss up
+               // ActiveX warnings on initial page load
+               // for IE 6 users with security settings.
+               wgAjaxWatch.supported = false;
+               return true;
+       }
+
        wgAjaxWatch.inprogress = true;
        wgAjaxWatch.setLinkText( wgAjaxWatch.watching
                ? wgAjaxWatch.unwatchingMsg : wgAjaxWatch.watchingMsg);
@@ -120,11 +128,6 @@ wgAjaxWatch.onLoad = function() {
                }
        }
 
-       if(!wfSupportsAjax()) {
-               wgAjaxWatch.supported = false;
-               return;
-       }
-
        // The id can be either for the parent (Monobook-based) or the element
        // itself (non-Monobook)
        wgAjaxWatch.watchLinks.push( el1.tagName.toLowerCase() == "a"