r23509 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23508‎ | r23509 | r23510 >
Date:16:06, 28 June 2007
Author:brion
Status:old
Tags:
Comment:
* 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.

We still get prompts on IE 6, though, which is kind of annoying.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/skins/common/ajax.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/ajax.js
@@ -39,16 +39,21 @@
4040 sajax_debug("sajax_init_object() called..")
4141 var A;
4242 try {
43 - A=new ActiveXObject("Msxml2.XMLHTTP");
 43+ // Try the new style before ActiveX so we don't
 44+ // unnecessarily trigger warnings in IE 7 when
 45+ // set to prompt about ActiveX usage
 46+ A = new XMLHttpRequest();
4447 } catch (e) {
4548 try {
46 - A=new ActiveXObject("Microsoft.XMLHTTP");
47 - } catch (oc) {
48 - A=null;
 49+ A=new ActiveXObject("Msxml2.XMLHTTP");
 50+ } catch (e) {
 51+ try {
 52+ A=new ActiveXObject("Microsoft.XMLHTTP");
 53+ } catch (oc) {
 54+ A=null;
 55+ }
4956 }
5057 }
51 - if(!A && typeof XMLHttpRequest != "undefined")
52 - A = new XMLHttpRequest();
5358 if (!A)
5459 sajax_debug("Could not create connection object.");
5560
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1198,7 +1198,7 @@
11991199 * to ensure that client-side caches don't keep obsolete copies of global
12001200 * styles.
12011201 */
1202 -$wgStyleVersion = '78';
 1202+$wgStyleVersion = '79';
12031203
12041204
12051205 # Server-side caching:
Index: trunk/phase3/RELEASE-NOTES
@@ -226,6 +226,9 @@
227227 * (bug 10397) Fix AJAX watch error fallback when we receive a bogus result
228228 * (bug 10396) Fix AJAX error when $wgScriptPath/index.php is not valid;
229229 using $wgScript now included in JS info
 230+* Use native XMLHttpRequest class in preference to ActiveX on IE 7; this
 231+ avoids the "ActiveX "Do you want to allow ActiveX?" prompt when something
 232+ security settings are cranked this way and AJAX-y gets used.
230233
231234
232235 == API changes since 1.10 ==

Follow-up revisions

RevisionCommit summaryAuthorDate
r23581Merged revisions 23406-23580 via svnmerge from...david04:50, 30 June 2007

Status & tagging log