From: Alexandre Emsenhuber Date: Wed, 13 Jan 2010 20:23:14 +0000 (+0000) Subject: * (bug 21738) Fix for r57119: OutputPage::setSyndicated() now works again (was breaki... X-Git-Tag: 1.31.0-rc.0~38284 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=f33c8d775b9d206deb307cf6a11f38fcc73b9052;p=lhc%2Fweb%2Fwiklou.git * (bug 21738) Fix for r57119: OutputPage::setSyndicated() now works again (was breaking Special:RecentChanges' feeds, ...) --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b1ca97abd2..6498edc9bc 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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 ); } }