* (bug 5262) Fully-qualified $wgStylePath no longer corrupted on XML feeds
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 12 Feb 2008 22:34:43 +0000 (22:34 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 12 Feb 2008 22:34:43 +0000 (22:34 +0000)
RELEASE-NOTES
includes/Feed.php

index 12ec965..18d6e33 100644 (file)
@@ -384,6 +384,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 12784) Change "bool" types to smallint to handle Postgres 8.3 strictness.
 * (bug 12301) Allow maintenance/findhooks.php to search hooks in multiple directories.
 * (bug 7681, 11559) Cookie values no longer override GET and POST variables.
+* (bug 5262) Fully-qualified $wgStylePath no longer corrupted on XML feeds
 
 
 == Parser changes in 1.12 ==
index 503b43b..03cda1a 100644 (file)
@@ -147,11 +147,16 @@ class ChannelFeed extends FeedItem {
         */
        function outXmlHeader() {
                global $wgServer, $wgStylePath, $wgStyleVersion;
+               if( substr( $wgStylePath, 0, 1 ) == '/' ) {
+                       $stylePath = $wgServer . $wgStylePath;
+               } else {
+                       $stylePath = $wgStylePath;
+               }
 
                $this->httpHeaders();
                echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
                echo '<?xml-stylesheet type="text/css" href="' .
-                       htmlspecialchars( "$wgServer$wgStylePath/common/feed.css?$wgStyleVersion" ) . '"?' . ">\n";
+                       htmlspecialchars( "$stylePath/common/feed.css?$wgStyleVersion" ) . '"?' . ">\n";
        }
 }