typo
[lhc/web/wiklou.git] / includes / SpecialRecentchanges.php
index 934ffe5..4470c76 100644 (file)
@@ -1,16 +1,16 @@
 <?php
 
-include_once( "Feed.php" );
+require_once( "Feed.php" );
 
 function wfSpecialRecentchanges( $par )
 {
        global $wgUser, $wgOut, $wgLang, $wgTitle, $wgMemc, $wgDBname;
        global $wgRequest, $wgSitename, $wgLanguageCode;
+       global $wgFeedClasses;
        $fname = "wfSpecialRecentchanges";
-       
+
        # Get query parameters
        $feedFormat = $wgRequest->getVal( "feed" );
-       $feeding = ( $feedFormat == "rss" );
 
        $defaultDays = $wgUser->getOption( 'rcdays' );
        if ( !$defaultDays ) {
@@ -111,31 +111,32 @@ function wfSpecialRecentchanges( $par )
        } else {
                $note = wfMsg( "rcnote", $wgLang->formatNum( $limit ), $wgLang->formatNum( $days ) );
        }
-       $wgOut->addHTML( "\n<hr/>\n{$note}\n<br/>" );
+       $wgOut->addHTML( "\n<hr />\n{$note}\n<br />" );
 
        $note = rcDayLimitLinks( $days, $limit, "Recentchanges", $hideparams, false, $minorLink, $botLink, $liuLink );
 
-       $note .= "<br/>\n" . wfMsg( "rclistfrom",
+       $note .= "<br />\n" . wfMsg( "rclistfrom",
          $sk->makeKnownLink( $wgLang->specialPage( "Recentchanges" ),
          $wgLang->timeanddate( $now, true ), "{$hideparams}&from=$now" ) );
 
        $wgOut->addHTML( "{$note}\n" );
 
-       if( $feeding ) {
-               $feed = new RSSFeed(
+       if( isset($wgFeedClasses[$feedFormat]) ) {
+               $feed = new $wgFeedClasses[$feedFormat](
                        $wgSitename . " - " . wfMsg( "recentchanges" ) . " [" . $wgLanguageCode . "]",
                        htmlspecialchars( wfMsg( "recentchangestext" ) ),
                        $wgTitle->getFullUrl() );
                $feed->outHeader();
                foreach( $rows as $obj ) {
                        $title = Title::makeTitle( $obj->rc_namespace, $obj->rc_title );
+                       $talkpage = $title->getTalkPage();
                        $item = new FeedItem(
                                $title->getPrefixedText(),
                                htmlspecialchars( $obj->rc_comment ),
                                $title->getFullURL(),
                                $obj->rc_timestamp,
                                $obj->rc_user_text,
-                               htmlspecialchars( $obj->rc_comment )
+                               $talkpage->getFullURL()
                                );
                        $feed->outItem( $item );
                }