From 9c81db38d04b101b3f50d0145279471fba8ef746 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 12 Feb 2008 22:34:43 +0000 Subject: [PATCH] * (bug 5262) Fully-qualified $wgStylePath no longer corrupted on XML feeds --- RELEASE-NOTES | 1 + includes/Feed.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 12ec96523c..18d6e33cd0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/Feed.php b/includes/Feed.php index 503b43bdce..03cda1a0e2 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -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 '' . "\n"; echo '\n"; + htmlspecialchars( "$stylePath/common/feed.css?$wgStyleVersion" ) . '"?' . ">\n"; } } -- 2.20.1