*
* @param $title String: feed's title
* @param $description String: feed's description
+ * @param $url String: url of origin page
* @return ChannelFeed subclass or false on failure
*/
- public function getFeedObject( $title, $description ) {
- global $wgSitename, $wgContLanguageCode, $wgFeedClasses, $wgTitle;
- $feedTitle = "$wgSitename - {$title} [$wgContLanguageCode]";
- if( !isset($wgFeedClasses[$this->format] ) )
+ public function getFeedObject( $title, $description, $url ) {
+ global $wgSitename, $wgLanguageCode, $wgFeedClasses;
+
+ if ( !isset( $wgFeedClasses[$this->format] ) ) {
return false;
+ }
+
+ $feedTitle = "$wgSitename - {$title} [$wgLanguageCode]";
return new $wgFeedClasses[$this->format](
- $feedTitle, htmlspecialchars( $description ), $wgTitle->getFullUrl() );
+ $feedTitle, htmlspecialchars( $description ), $url );
}
/**
* @return null or true
*/
public function execute( $feed, $rows, $lastmod, $opts ) {
- global $messageMemc, $wgFeedCacheTimeout;
- global $wgSitename, $wgLang, $wgRenderHashAppend;
+ global $wgLang, $wgRenderHashAppend;
if ( !FeedUtils::checkFeedOutput( $this->format ) ) {
return;