* @param Feed $feed
*/
public static function generateFeed( $rows, &$feed ) {
- wfProfileIn( __METHOD__ );
$items = self::buildItems( $rows );
$feed->outHeader();
foreach ( $items as $item ) {
$feed->outItem( $item );
}
$feed->outFooter();
- wfProfileOut( __METHOD__ );
}
/**
* @return array
*/
public static function buildItems( $rows ) {
- wfProfileIn( __METHOD__ );
$items = array();
# Merge adjacent edits by one user
$sorted = array();
$n = 0;
foreach ( $rows as $obj ) {
+ if ( $obj->rc_type == RC_EXTERNAL ) {
+ continue;
+ }
+
if ( $n > 0 &&
$obj->rc_type == RC_EDIT &&
$obj->rc_namespace >= 0 &&
);
}
- wfProfileOut( __METHOD__ );
return $items;
}
}