From: Brion Vibber Date: Sat, 9 Oct 2004 06:49:28 +0000 (+0000) Subject: Merge adjacent edits to same page by same user in the RSS feed X-Git-Tag: 1.5.0alpha1~1623 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=32111c831053e20f1dc110a6c56baf4b53dc7a93;p=lhc%2Fweb%2Fwiklou.git Merge adjacent edits to same page by same user in the RSS feed --- diff --git a/includes/SpecialRecentchanges.php b/includes/SpecialRecentchanges.php index d227aa0e8f..2f360478ae 100644 --- a/includes/SpecialRecentchanges.php +++ b/includes/SpecialRecentchanges.php @@ -130,7 +130,24 @@ function wfSpecialRecentchanges( $par ) { htmlspecialchars( wfMsg( 'recentchangestext' ) ), $wgTitle->getFullUrl() ); $feed->outHeader(); + + # Merge adjacent edits by one user + $sorted = array(); + $n = 0; foreach( $rows as $obj ) { + if( $n > 0 && + $obj->rc_namespace >= 0 && + $obj->rc_cur_id == $sorted[$n-1]->rc_cur_id && + $obj->rc_user_text == $sorted[$n-1]->rc_user_text ) { + $sorted[$n-1]->rc_last_oldid = $obj->rc_last_oldid; + } else { + $sorted[$n] = $obj; + $n++; + } + $first = false; + } + + foreach( $sorted as $obj ) { $title = Title::makeTitle( $obj->rc_namespace, $obj->rc_title ); $talkpage = $title->getTalkPage(); $item = new FeedItem(