From: Alexandre Emsenhuber Date: Sat, 19 Feb 2011 14:40:56 +0000 (+0000) Subject: * Use OutputPage::getSyndicationLinks() to build feed links X-Git-Tag: 1.31.0-rc.0~31897 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=6421160ec05a03775645a2e7344322c266356cb1;p=lhc%2Fweb%2Fwiklou.git * Use OutputPage::getSyndicationLinks() to build feed links * Ported r82395 to legacy skins (possible double "printable" parameter in URL and hidden dependency of $wgTitle) --- diff --git a/includes/SkinLegacy.php b/includes/SkinLegacy.php index 0f304a9cb6..201c3f08e9 100644 --- a/includes/SkinLegacy.php +++ b/includes/SkinLegacy.php @@ -566,18 +566,19 @@ class LegacyTemplate extends BaseTemplate { } function printableLink() { - global $wgOut, $wgFeedClasses, $wgRequest, $wgLang; + global $wgOut, $wgRequest, $wgLang; $s = array(); if ( !$wgOut->isPrintable() ) { - $printurl = $wgRequest->escapeAppendQuery( 'printable=yes' ); + $printurl = htmlspecialchars( $this->getSkin()->getTitle()->getLocalUrl( + $wgRequest->appendQueryValue( 'printable', 'yes', true ) ) ); $s[] = "" . wfMsg( 'printableversion' ) . ''; } if ( $wgOut->isSyndicated() ) { - foreach ( $wgFeedClasses as $format => $class ) { - $feedurl = $wgRequest->escapeAppendQuery( "feed=$format" ); + foreach ( $wgOut->getSyndicationLinks() as $format => $link ) { + $feedurl = htmlspecialchars( $link ); $s[] = "" . wfMsgHtml( "feed-$format" ) . ""; }