From: Raimond Spekking Date: Wed, 7 Sep 2011 12:56:06 +0000 (+0000) Subject: Fix r95655 per Formfix's CR: X-Git-Tag: 1.31.0-rc.0~27840 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=92f3126cad9b36ef8505c03a29e619fe018bb3d8;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 . '' ); }