Refactor need for duplicate private Title in FeedSMItem away by moving functionality...
authorMark A. Hershberger <mah@users.mediawiki.org>
Wed, 20 Apr 2011 03:58:34 +0000 (03:58 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Wed, 20 Apr 2011 03:58:34 +0000 (03:58 +0000)
includes/Feed.php

index 0ca419e..e48f311 100644 (file)
@@ -70,6 +70,15 @@ class FeedItem {
                $this->Comments = $Comments;
        }
 
+       /**
+        * Get the last touched timestamp
+        *
+        * @return String last-touched timestamp
+        */
+       public function getLastMod() {
+               return $this->Title->getTouched();
+       }
+
        /**
         * Encode $string so that it can be safely embedded in a XML document
         *
@@ -113,6 +122,16 @@ class FeedItem {
                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(),
+       }
+
        /**
         * Get the URL of this item; already xml-encoded
         *
@@ -401,7 +420,7 @@ class AtomFeed extends ChannelFeed {
 
 <?php /* FIXME need to add comments
        <?php if( $item->getComments() ) { ?><dc:comment><?php print $item->getComments() ?></dc:comment><?php }?>
-      */
+         */
        }
 
        /**