Initialise wgDBadminuser and wgDBadminpassword to null in DefaultSettings.php, to...
[lhc/web/wiklou.git] / includes / ChangesFeed.php
index aab2b4e..ce49b00 100644 (file)
@@ -18,16 +18,16 @@ class ChangesFeed {
                        $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);
 
@@ -113,14 +113,16 @@ class ChangesFeed {
                foreach( $sorted as $obj ) {
                        $title = Title::makeTitle( $obj->rc_namespace, $obj->rc_title );
                        $talkpage = $title->getTalkPage();
+                       // Skip items with deleted content (avoids partially complete/inconsistent output)
+                       if( $obj->rc_deleted ) continue;
                        $item = new FeedItem(
                                $title->getPrefixedText(),
                                FeedUtils::formatDiff( $obj ),
-                               $title->getFullURL( 'diff=' . $obj->rc_this_oldid . '&oldid=prev' ),
+                               $obj->rc_this_oldid ? $title->getFullURL( 'diff=' . $obj->rc_this_oldid . '&oldid=prev' ) : $title->getFullURL(),
                                $obj->rc_timestamp,
                                ($obj->rc_deleted & Revision::DELETED_USER) ? wfMsgHtml('rev-deleted-user') : $obj->rc_user_text,
                                $talkpage->getFullURL()
-                               );
+                       );
                        $feed->outItem( $item );
                }
                $feed->outFooter();