* (bug 21738) Fix for r57119: OutputPage::setSyndicated() now works again (was breaking Special:RecentChanges' feeds, ...)

This commit is contained in:
Alexandre Emsenhuber 2010-01-13 20:23:14 +00:00
parent 47cfadd0f6
commit f33c8d775b

View file

@ -393,7 +393,13 @@ class OutputPage {
public function disable() { $this->mDoNothing = true; }
public function isDisabled() { return $this->mDoNothing; }
public function setSyndicated( $show = true ) { $this->mShowFeedLinks = $show; }
public function setSyndicated( $show = true ) {
if ( $show ) {
$this->setFeedAppendQuery( false );
} else {
$this->mFeedLinks = array();
}
}
public function setFeedAppendQuery( $val ) {
global $wgFeedClasses;
@ -401,7 +407,9 @@ class OutputPage {
$this->mFeedLinks = array();
foreach( $wgFeedClasses as $type => $class ) {
$query = "feed=$type&".$val;
$query = "feed=$type";
if ( is_string( $val ) )
$query .= '&' . $val;
$this->mFeedLinks[$type] = $this->getTitle()->getLocalURL( $query );
}
}