From 92f3126cad9b36ef8505c03a29e619fe018bb3d8 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Wed, 7 Sep 2011 12:56:06 +0000 Subject: [PATCH] Fix r95655 per Formfix's CR: * use getCanonicalURL() - this part should be deployed to 1.17wmf1 * Do not show &oldid= in case of nonexisting pages, incl. file description pages from InstantCommons files --- includes/Skin.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/Skin.php b/includes/Skin.php index 10eba643ad..6b1365cfad 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -624,7 +624,12 @@ abstract class Skin extends ContextSource { */ function printSource() { $oldid = $this->getRevisionId(); - $url = htmlspecialchars( $this->getTitle()->getFullURL( 'oldid=' . $oldid ) ); + if ( $oldid ) { + $url = htmlspecialchars( $this->getTitle()->getCanonicalURL( 'oldid=' . $oldid ) ); + } else { + // oldid not available for non existing pages + $url = htmlspecialchars( $this->getTitle()->getCanonicalURL() ); + } return wfMsg( 'retrievedfrom', '' . $url . '' ); } -- 2.20.1