Added $wgLocalStylePath global variable, and solved bug #22858 by using this new...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Mon, 26 Apr 2010 21:02:30 +0000 (21:02 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Mon, 26 Apr 2010 21:02:30 +0000 (21:02 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/Setup.php
skins/Vector.php

index 99d8bc0..2d8dfbb 100644 (file)
@@ -55,6 +55,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 23276) Add hook to Special:NewPages to modify query
 * Add accesskey 's' and tooltip to 'Save' button at Special:Preferences
 * (bug 20186) Allow filtering Special:Contributions for RevisionDeleted edits
+* (bug 22858) $wgLocalStylePath is by default set to the same value as
+  $wgStylePath but should never point to a different domain than the site is
+  on, allowing skins to use .htc files which are not cross-domain friendly.
 
 === Bug fixes in 1.17 ===
 * (bug 17560) Half-broken deletion moved image files to deletion archive
index 5f20dea..b5fd2e9 100644 (file)
@@ -145,6 +145,7 @@ $wgRedirectScript   = false; ///< defaults to "{$wgScriptPath}/redirect{$wgScrip
  * asset paths as seen by users
  */
 $wgStylePath   = false; ///< defaults to "{$wgScriptPath}/skins"
+$wgLocalStylePath   = false; ///< defaults to the same value as $wgStylePath, and shouldn't point to an external domain
 $wgExtensionAssetsPath = false; ///< defaults to "{$wgScriptPath}/extensions"
 
 /**
index b37fb5e..b8ce9be 100644 (file)
@@ -39,6 +39,7 @@ if( $wgArticlePath === false ) {
 }
 
 if( $wgStylePath === false ) $wgStylePath = "$wgScriptPath/skins";
+if( $wgLocalStylePath === false ) $wgLocalStylePath = "$wgScriptPath/skins";
 if( $wgStyleDirectory === false) $wgStyleDirectory   = "$IP/skins";
 if( $wgExtensionAssetsPath === false ) $wgExtensionAssetsPath = "$wgScriptPath/extensions";
 
index 4fa5a65..74e346c 100644 (file)
@@ -26,7 +26,7 @@ class SkinVector extends SkinTemplate {
         * @param object $out Output page object to initialize
         */
        public function initPage( OutputPage $out ) {
-               global $wgStylePath;
+               global $wgLocalStylePath;
                
                parent::initPage( $out );
 
@@ -35,7 +35,7 @@ class SkinVector extends SkinTemplate {
                // wait for the CSS file to load before fetching the HTC file.
                $out->addScript(
                        '<!--[if lt IE 7]><style type="text/css">body{behavior:url("' .
-                               $wgStylePath .
+                               $wgLocalStylePath .
                                '/vector/csshover.htc")}</style><![endif]-->'
                );
        }