r82455 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82454‎ | r82455 | r82456 >
Date:14:40, 19 February 2011
Author:ialex
Status:ok
Tags:
Comment:
* Use OutputPage::getSyndicationLinks() to build feed links
* Ported r82395 to legacy skins (possible double "printable" parameter in URL and hidden dependency of $wgTitle)
Modified paths:
  • /trunk/phase3/includes/SkinLegacy.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinLegacy.php
@@ -566,18 +566,19 @@
567567 }
568568
569569 function printableLink() {
570 - global $wgOut, $wgFeedClasses, $wgRequest, $wgLang;
 570+ global $wgOut, $wgRequest, $wgLang;
571571
572572 $s = array();
573573
574574 if ( !$wgOut->isPrintable() ) {
575 - $printurl = $wgRequest->escapeAppendQuery( 'printable=yes' );
 575+ $printurl = htmlspecialchars( $this->getSkin()->getTitle()->getLocalUrl(
 576+ $wgRequest->appendQueryValue( 'printable', 'yes', true ) ) );
576577 $s[] = "<a href=\"$printurl\" rel=\"alternate\">" . wfMsg( 'printableversion' ) . '</a>';
577578 }
578579
579580 if ( $wgOut->isSyndicated() ) {
580 - foreach ( $wgFeedClasses as $format => $class ) {
581 - $feedurl = $wgRequest->escapeAppendQuery( "feed=$format" );
 581+ foreach ( $wgOut->getSyndicationLinks() as $format => $link ) {
 582+ $feedurl = htmlspecialchars( $link );
582583 $s[] = "<a href=\"$feedurl\" rel=\"alternate\" type=\"application/{$format}+xml\""
583584 . " class=\"feedlink\">" . wfMsgHtml( "feed-$format" ) . "</a>";
584585 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82395* Use appendQueryValue() instead of appendQuery() so that if e.g. printable=n...ialex12:25, 18 February 2011

Status & tagging log