Fix for r85114, see code reviev
[lhc/web/wiklou.git] / includes / ChangesFeed.php
index 4a5a2d1..8a17ef8 100644 (file)
@@ -24,15 +24,19 @@ class ChangesFeed {
         *
         * @param $title String: feed's title
         * @param $description String: feed's description
+        * @param $url String: url of origin page
         * @return ChannelFeed subclass or false on failure
         */
-       public function getFeedObject( $title, $description ) {
-               global $wgSitename, $wgContLanguageCode, $wgFeedClasses, $wgTitle;
-               $feedTitle = "$wgSitename  - {$title} [$wgContLanguageCode]";
-               if( !isset($wgFeedClasses[$this->format] ) )
+       public function getFeedObject( $title, $description, $url ) {
+               global $wgSitename, $wgLanguageCode, $wgFeedClasses;
+
+               if ( !isset( $wgFeedClasses[$this->format] ) ) {
                        return false;
+               }
+
+               $feedTitle = "$wgSitename  - {$title} [$wgLanguageCode]";
                return new $wgFeedClasses[$this->format](
-                       $feedTitle, htmlspecialchars( $description ), $wgTitle->getFullUrl() );
+                       $feedTitle, htmlspecialchars( $description ), $url );
        }
 
        /**
@@ -45,8 +49,7 @@ class ChangesFeed {
         * @return null or true
         */
        public function execute( $feed, $rows, $lastmod, $opts ) {
-               global $messageMemc, $wgFeedCacheTimeout;
-               global $wgSitename, $wgLang, $wgRenderHashAppend;
+               global $wgLang, $wgRenderHashAppend;
 
                if ( !FeedUtils::checkFeedOutput( $this->format ) ) {
                        return;