From: Brion Vibber Date: Thu, 28 Jun 2007 15:13:28 +0000 (+0000) Subject: * (bug 10396) Fix AJAX error when $wgScriptPath/index.php is not valid; X-Git-Tag: 1.31.0-rc.0~52359 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=6bd571c66e4b2bf6ec0674af32d307449d3d6781;p=lhc%2Fweb%2Fwiklou.git * (bug 10396) Fix AJAX error when $wgScriptPath/index.php is not valid; using $wgScript now included in JS info --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4c793d0a3c..316af87b89 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index a97993b59e..4579cac2ed 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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: diff --git a/includes/Skin.php b/includes/Skin.php index 2626e33351..a014868010 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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() ), diff --git a/skins/common/ajax.js b/skins/common/ajax.js index d90bea091f..87fe834902 100644 --- a/skins/common/ajax.js +++ b/skins/common/ajax.js @@ -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);