* (bug 10396) Fix AJAX error when $wgScriptPath/index.php is not valid;
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 28 Jun 2007 15:13:28 +0000 (15:13 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 28 Jun 2007 15:13:28 +0000 (15:13 +0000)
  using $wgScript now included in JS info

RELEASE-NOTES
includes/DefaultSettings.php
includes/Skin.php
skins/common/ajax.js

index 4c793d0..316af87 100644 (file)
@@ -224,6 +224,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 7071) Properly handle an 'oldid' passed to view or edit that doesn't
   match the given title. Fixes inconsistencies with talk, history, edit links.
 * (bug 10397) Fix AJAX watch error fallback when we receive a bogus result
+* (bug 10396) Fix AJAX error when $wgScriptPath/index.php is not valid;
+  using $wgScript now included in JS info
 
 
 == API changes since 1.10 ==
index a97993b..4579cac 100644 (file)
@@ -1198,7 +1198,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches don't keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '77';
+$wgStyleVersion = '78';
 
 
 # Server-side caching:
index 2626e33..a014868 100644 (file)
@@ -293,7 +293,7 @@ class Skin extends Linker {
         * The odd calling convention is for backwards compatibility
         */
        static function makeGlobalVariablesScript( $data ) {
-               global $wgStylePath, $wgUser;
+               global $wgScript, $wgStylePath, $wgUser;
                global $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang, $wgLang;
                global $wgTitle, $wgCanonicalNamespaceNames, $wgOut, $wgArticle;
                global $wgBreakFrames, $wgRequest;
@@ -306,6 +306,7 @@ class Skin extends Linker {
                        'stylepath' => $wgStylePath,
                        'wgArticlePath' => $wgArticlePath,
                        'wgScriptPath' => $wgScriptPath,
+                       'wgScript' => $wgScript,
                        'wgServer' => $wgServer,
                        'wgCanonicalNamespace' => $nsname,
                        'wgCanonicalSpecialPageName' => SpecialPage::resolveAlias( $wgTitle->getDBKey() ),
index d90bea0..87fe834 100644 (file)
@@ -75,7 +75,9 @@ function sajax_do_call(func_name, args, target) {
        var i, x, n;
        var uri;
        var post_data;
-       uri = wgServer + wgScriptPath + "/index.php?action=ajax";
+       uri = wgServer +
+               ((wgServer == null) ? (wgScriptPath + "/index.php") : wgScript) +
+               "?action=ajax";
        if (sajax_request_type == "GET") {
                if (uri.indexOf("?") == -1)
                        uri = uri + "?rs=" + encodeURIComponent(func_name);