* (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 ==
* 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;
'stylepath' => $wgStylePath,
'wgArticlePath' => $wgArticlePath,
'wgScriptPath' => $wgScriptPath,
+ 'wgScript' => $wgScript,
'wgServer' => $wgServer,
'wgCanonicalNamespace' => $nsname,
'wgCanonicalSpecialPageName' => SpecialPage::resolveAlias( $wgTitle->getDBKey() ),
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);