Another artefact of the disable account merge
[lhc/web/wiklou.git] / includes / Feed.php
index 3e0c913..fc637be 100644 (file)
@@ -39,42 +39,33 @@ class FeedItem {
        /**
         * @var Title
         */
-       var $Title = 'Wiki';
-       var $Description = '';
-       var $Url = '';
-       var $Date = '';
-       var $Author = '';
-       var $UniqueId = '';
-       var $RSSIsPermalink;
+       var $title;
+       var $description;
+       var $url;
+       var $date;
+       var $author;
+       var $uniqueId;
+       var $comments;
+       var $rssIsPermalink = false;
 
        /**
         * Constructor
         *
-        * @param $Title String|Title Item's title
-        * @param $Description String
-        * @param $Url String: URL uniquely designating the item.
-        * @param $Date String: Item's date
-        * @param $Author String: Author's user name
-        * @param $Comments String
-        */
-       function __construct( $Title, $Description, $Url, $Date = '', $Author = '', $Comments = '' ) {
-               $this->Title = $Title;
-               $this->Description = $Description;
-               $this->Url = $Url;
-               $this->UniqueId = $Url;
-               $this->RSSIsPermalink = false;
-               $this->Date = $Date;
-               $this->Author = $Author;
-               $this->Comments = $Comments;
-       }
-
-       /**
-        * Get the last touched timestamp
-        *
-        * @return String last-touched timestamp
-        */
-       public function getLastMod() {
-               return $this->Title->getTouched();
+        * @param $title String|Title Item's title
+        * @param $description String
+        * @param $url String: URL uniquely designating the item.
+        * @param $date String: Item's date
+        * @param $author String: Author's user name
+        * @param $comments String
+        */
+       function __construct( $title, $description, $url, $date = '', $author = '', $comments = '' ) {
+               $this->title = $title;
+               $this->description = $description;
+               $this->url = $url;
+               $this->uniqueId = $url;
+               $this->date = $date;
+               $this->author = $author;
+               $this->comments = $comments;
        }
 
        /**
@@ -95,8 +86,8 @@ class FeedItem {
         * @return String
         */
        public function getUniqueId() {
-               if ( $this->UniqueId ) {
-                       return $this->xmlEncode( $this->UniqueId );
+               if ( $this->uniqueId ) {
+                       return $this->xmlEncode( $this->uniqueId );
                }
        }
 
@@ -104,11 +95,11 @@ class FeedItem {
         * set the unique id of an item
         *
         * @param $uniqueId String: unique id for the item
-        * @param $RSSisPermalink Boolean: set to true if the guid (unique id) is a permalink (RSS feeds only)
+        * @param $rssIsPermalink Boolean: set to true if the guid (unique id) is a permalink (RSS feeds only)
         */
-       public function setUniqueId($uniqueId, $RSSisPermalink = false) {
-               $this->UniqueId = $uniqueId;
-               $this->RSSIsPermalink = $RSSisPermalink;
+       public function setUniqueId( $uniqueId, $rssIsPermalink = false ) {
+               $this->uniqueId = $uniqueId;
+               $this->rssIsPermalink = $rssIsPermalink;
        }
 
        /**
@@ -117,17 +108,7 @@ class FeedItem {
         * @return String
         */
        public function getTitle() {
-               return $this->xmlEncode( $this->Title );
-       }
-
-       /**
-        * Get the DB prefixed title
-        *
-        * @return String the prefixed title, with underscores and
-        *  any interwiki and namespace prefixes
-        */
-       public function getDBPrefixedTitle() {
-               return $this->Title->getPrefixedDBKey();
+               return $this->xmlEncode( $this->title );
        }
 
        /**
@@ -136,7 +117,7 @@ class FeedItem {
         * @return String
         */
        public function getUrl() {
-               return $this->xmlEncode( $this->Url );
+               return $this->xmlEncode( $this->url );
        }
 
        /**
@@ -145,7 +126,7 @@ class FeedItem {
         * @return String
         */
        public function getDescription() {
-               return $this->xmlEncode( $this->Description );
+               return $this->xmlEncode( $this->description );
        }
 
        /**
@@ -164,7 +145,7 @@ class FeedItem {
         * @return String
         */
        public function getDate() {
-               return $this->Date;
+               return $this->date;
        }
 
        /**
@@ -173,7 +154,7 @@ class FeedItem {
         * @return String
         */
        public function getAuthor() {
-               return $this->xmlEncode( $this->Author );
+               return $this->xmlEncode( $this->author );
        }
 
        /**
@@ -182,7 +163,7 @@ class FeedItem {
         * @return String
         */
        public function getComments() {
-               return $this->xmlEncode( $this->Comments );
+               return $this->xmlEncode( $this->comments );
        }
 
        /**
@@ -239,13 +220,13 @@ class ChannelFeed extends FeedItem {
         * but can also be called separately.
         */
        public function httpHeaders() {
-               global $wgOut, $wgVaryOnXFPForAPI;
+               global $wgOut, $wgVaryOnXFP;
 
                # We take over from $wgOut, excepting its cache header info
                $wgOut->disable();
                $mimetype = $this->contentType();
                header( "Content-type: $mimetype; charset=UTF-8" );
-               if ( $wgVaryOnXFPForAPI ) {
+               if ( $wgVaryOnXFP ) {
                        $wgOut->addVaryHeader( 'X-Forwarded-Proto' );
                }
                $wgOut->sendCacheControl();
@@ -325,7 +306,7 @@ class RSSFeed extends ChannelFeed {
                <item>
                        <title><?php print $item->getTitle() ?></title>
                        <link><?php print wfExpandUrl( $item->getUrl(), PROTO_CURRENT ) ?></link>
-                       <guid<?php if( !$item->RSSIsPermalink ) print ' isPermaLink="false"' ?>><?php print $item->getUniqueId() ?></guid>
+                       <guid<?php if( !$item->rssIsPermalink ) print ' isPermaLink="false"' ?>><?php print $item->getUniqueId() ?></guid>
                        <description><?php print $item->getDescription() ?></description>
                        <?php if( $item->getDate() ) { ?><pubDate><?php print $this->formatTime( $item->getDate() ) ?></pubDate><?php } ?>
                        <?php if( $item->getAuthor() ) { ?><dc:creator><?php print $item->getAuthor() ?></dc:creator><?php }?>