From b3b3c6e0c6e63473422caa6c9828e6d43c2dab22 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 19 Nov 2003 02:25:39 +0000 Subject: [PATCH] Preserve all parameters on printable link --- includes/Skin.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 1b4db0401f..47a4ee849e 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -337,7 +337,8 @@ class Skin { if ( $wgOut->isPrintable() ) { $s = "\n\n"; - $u = $wgServer . $wgTitle->getFullURL(); + $u = htmlspecialchars( $wgServer . $wgTitle->getFullURL() ); + $u = "$u"; $rf = wfMsg( "retrievedfrom", $u ); if ( $wgOut->isArticle() ) { @@ -455,9 +456,13 @@ if ( isset ( $wgUseApproval ) && $wgUseApproval ) { global $wgOut, $wgTitle, $oldid, $action; - if ( "history" == $action ) { $q = "action=history&"; } - else { $q = ""; } - + $q = ""; + foreach( $_GET as $var => $val ) { + if( $var != "title" && $var != "printable" ) + $q .= urlencode( $var ) . "=" . urlencode( $val ); + } + if( !empty( $q ) ) $q .= "&"; + $s = $this->makeKnownLink( $wgTitle->getPrefixedText(), WfMsg( "printableversion" ), "{$q}printable=yes" ); return $s; -- 2.20.1