Don't add empty title attributes to anchor links
[lhc/web/wiklou.git] / includes / ChangesFeed.php
index 9bee179..a0c2767 100644 (file)
@@ -12,21 +12,22 @@ class ChangesFeed {
        public function getFeedObject( $title, $description ) {
                global $wgSitename, $wgContLanguageCode, $wgFeedClasses, $wgTitle;
                $feedTitle = "$wgSitename  - {$title} [$wgContLanguageCode]";
-
+               if( !isset($wgFeedClasses[$this->format] ) )
+                       return false;
                return new $wgFeedClasses[$this->format](
                        $feedTitle, htmlspecialchars( $description ), $wgTitle->getFullUrl() );
        }
 
-       public function execute( $feed, $rows, $limit = 0 , $hideminor = false, $lastmod = false ) {
+       public function execute( $feed, $rows, $limit=0, $hideminor=false, $lastmod=false, $target='' ) {
                global $messageMemc, $wgFeedCacheTimeout;
-               global $wgFeedClasses, $wgTitle, $wgSitename, $wgContLanguageCode;
+               global $wgSitename, $wgContLanguageCode;
 
                if ( !FeedUtils::checkFeedOutput( $this->format ) ) {
                        return;
                }
 
                $timekey = wfMemcKey( $this->type, $this->format, 'timestamp' );
-               $key = wfMemcKey( $this->type, $this->format, 'limit', $limit, 'minor', $hideminor );
+               $key = wfMemcKey( $this->type, $this->format, $limit, $hideminor, $target );
 
                FeedUtils::checkPurge($timekey, $key);
 
@@ -85,7 +86,7 @@ class ChangesFeed {
        }
 
        /**
-       * @todo document
+       * Generate the feed items given a row from the database.
        * @param $rows Database resource with recentchanges rows
        * @param $feed Feed object
        */