From 6421160ec05a03775645a2e7344322c266356cb1 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 19 Feb 2011 14:40:56 +0000 Subject: [PATCH] * Use OutputPage::getSyndicationLinks() to build feed links * Ported r82395 to legacy skins (possible double "printable" parameter in URL and hidden dependency of $wgTitle) --- includes/SkinLegacy.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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" ) . ""; } -- 2.20.1