Revert r35848 per Brion's WONTFIX of bug 14536: "This would just mean that there...
[lhc/web/wiklou.git] / includes / Feed.php
index a77dcbc..512057d 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 /**
- * @todo document (needs one-sentence top-level class description + function descriptions).
+ * A base class for basic support for outputting syndication feeds in RSS and other formats.
  */
 class FeedItem {
        /**#@+
@@ -41,6 +41,7 @@ class FeedItem {
 
        /**#@+
         * @todo document
+        * @param $Url URL uniquely designating the item.
         */
        function __construct( $Title, $Description, $Url, $Date = '', $Author = '', $Comments = '' ) {
                $this->Title = $Title;
@@ -145,12 +146,13 @@ class ChannelFeed extends FeedItem {
         * @private
         */
        function outXmlHeader() {
-               global $wgServer, $wgStylePath, $wgStyleVersion;
+               global $wgStylePath, $wgStyleVersion;
 
                $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( wfExpandUrl( "$wgStylePath/common/feed.css?$wgStyleVersion" ) ) .
+                       '"?' . ">\n";
        }
 }
 
@@ -298,5 +300,3 @@ class AtomFeed extends ChannelFeed {
        </feed><?php
        }
 }
-
-?>