Hard deprecate MWNamespace::canTalk()
[lhc/web/wiklou.git] / includes / changes / ChangesFeed.php
index cffb59a..2b8c32c 100644 (file)
@@ -31,8 +31,6 @@ class ChangesFeed {
        public $format, $type, $titleMsg, $descMsg;
 
        /**
-        * Constructor
-        *
         * @param string $format Feed's format (either 'rss' or 'atom')
         * @param string $type Type of feed (for cache keys)
         */
@@ -84,10 +82,11 @@ class ChangesFeed {
                        return null;
                }
 
+               $cache = ObjectCache::getMainWANInstance();
                $optionsHash = md5( serialize( $opts->getAllValues() ) ) . $wgRenderHashAppend;
-               $timekey = wfMemcKey(
+               $timekey = $cache->makeKey(
                        $this->type, $this->format, $wgLang->getCode(), $optionsHash, 'timestamp' );
-               $key = wfMemcKey( $this->type, $this->format, $wgLang->getCode(), $optionsHash );
+               $key = $cache->makeKey( $this->type, $this->format, $wgLang->getCode(), $optionsHash );
 
                FeedUtils::checkPurge( $timekey, $key );
 
@@ -167,7 +166,7 @@ class ChangesFeed {
        /**
         * Generate the feed items given a row from the database, printing the feed.
         * @param object $rows IDatabase resource with recentchanges rows
-        * @param ChannelFeed $feed
+        * @param ChannelFeed &$feed
         */
        public static function generateFeed( $rows, &$feed ) {
                $items = self::buildItems( $rows );
@@ -208,7 +207,7 @@ class ChangesFeed {
 
                foreach ( $sorted as $obj ) {
                        $title = Title::makeTitle( $obj->rc_namespace, $obj->rc_title );
-                       $talkpage = MWNamespace::canTalk( $obj->rc_namespace )
+                       $talkpage = MWNamespace::hasTalkNamespace( $obj->rc_namespace )
                                ? $title->getTalkPage()->getFullURL()
                                : '';