X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FChangesFeed.php;h=ce49b005fd42797c81309f7ee76df576172bcc71;hb=f052f6a0e82f41e71e693e9762c64a6e37c0ba14;hp=aab2b4e43f2ab14fa45ee20515fd61872f96bc5b;hpb=8d830b928c3d00c4fcb5d3ce2dc3c863ad74a581;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ChangesFeed.php b/includes/ChangesFeed.php index aab2b4e43f..ce49b005fd 100644 --- a/includes/ChangesFeed.php +++ b/includes/ChangesFeed.php @@ -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();