Browse files

generate a full server url when resourceLoader url is not provided.

  • Loading branch information...
1 parent 307688d commit fac4628a9d0a5cd8cd8113d9d9f42a50946a4c0b Michael Dale committed Aug 16, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 includes/DefaultSettings.php
View
8 includes/DefaultSettings.php
@@ -20,8 +20,12 @@
// The version of the library
$wgMwEmbedVersion = '1.6.12.37';
+
+// Default HTTP protocol
+$wgHTTPProtocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? "https" : "http";
+
// Url to the resource loader php script:
-$wgResourceLoaderUrl = $wgMwEmbedPathUrl . 'ResourceLoader.php';
+$wgResourceLoaderUrl = $wgHTTPProtocol . '://' . $_SERVER['HTTP_HOST']. $wgMwEmbedPathUrl . 'ResourceLoader.php';
// The list of enabled modules
$wgMwEmbedEnabledModules = array();
@@ -33,8 +37,6 @@
$wgMwEmbedEnabledModules[] = $entry;
}
}
-// Default HTTP protocol
-$wgHTTPProtocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? "https" : "http";
// Default debug mode
$wgEnableScriptDebug = false;

0 comments on commit fac4628

Please sign in to comment.