Index: trunk/phase3/includes/ChangesFeed.php |
— | — | @@ -24,15 +24,19 @@ |
25 | 25 | * |
26 | 26 | * @param $title String: feed's title |
27 | 27 | * @param $description String: feed's description |
| 28 | + * @param $url String: url of origin page |
28 | 29 | * @return ChannelFeed subclass or false on failure |
29 | 30 | */ |
30 | | - public function getFeedObject( $title, $description ) { |
31 | | - global $wgSitename, $wgLanguageCode, $wgFeedClasses, $wgTitle; |
| 31 | + public function getFeedObject( $title, $description, $url ) { |
| 32 | + global $wgSitename, $wgLanguageCode, $wgFeedClasses; |
| 33 | + |
| 34 | + if ( !isset( $wgFeedClasses[$this->format] ) ) { |
| 35 | + return false; |
| 36 | + } |
| 37 | + |
32 | 38 | $feedTitle = "$wgSitename - {$title} [$wgLanguageCode]"; |
33 | | - if( !isset($wgFeedClasses[$this->format] ) ) |
34 | | - return false; |
35 | 39 | return new $wgFeedClasses[$this->format]( |
36 | | - $feedTitle, htmlspecialchars( $description ), $wgTitle->getFullUrl() ); |
| 40 | + $feedTitle, htmlspecialchars( $description ), $url ); |
37 | 41 | } |
38 | 42 | |
39 | 43 | /** |
Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php |
— | — | @@ -56,7 +56,8 @@ |
57 | 57 | $feed = new ChangesFeed( $feedFormat, false ); |
58 | 58 | $feedObj = $feed->getFeedObject( |
59 | 59 | wfMsgForContent( 'recentchangeslinked-title', $this->getTargetTitle()->getPrefixedText() ), |
60 | | - wfMsgForContent( 'recentchangeslinked-feed' ) |
| 60 | + wfMsgForContent( 'recentchangeslinked-feed' ), |
| 61 | + $this->getTitle()->getFullUrl() |
61 | 62 | ); |
62 | 63 | return array( $feed, $feedObj ); |
63 | 64 | } |
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php |
— | — | @@ -169,7 +169,8 @@ |
170 | 170 | $changesFeed = new ChangesFeed( $feedFormat, 'rcfeed' ); |
171 | 171 | $formatter = $changesFeed->getFeedObject( |
172 | 172 | wfMsgForContent( 'recentchanges' ), |
173 | | - wfMsgForContent( 'recentchanges-feed-description' ) |
| 173 | + wfMsgForContent( 'recentchanges-feed-description' ), |
| 174 | + $this->getTitle()->getFullUrl() |
174 | 175 | ); |
175 | 176 | return array( $changesFeed, $formatter ); |
176 | 177 | } |