* (bug 16428) Include permalink in printable version
authorRaimond Spekking <raymond@users.mediawiki.org>
Mon, 29 Aug 2011 10:47:44 +0000 (10:47 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Mon, 29 Aug 2011 10:47:44 +0000 (10:47 +0000)
RELEASE-NOTES-1.19
includes/Skin.php

index 82e30c5..ccdfcc4 100644 (file)
@@ -50,6 +50,7 @@ production.
 * Hook added to check for exempt from account creation throttle
 * (bug 30344) Add configuration variable for setting custom priorities when
   generating sitemaps
+* (bug 16428) Include permalink in printable version
 
 === Bug fixes in 1.19 ===
 * $wgUploadNavigationUrl should be used for file redlinks if
index 36d56c6..8e2a6c8 100644 (file)
@@ -616,9 +616,15 @@ abstract class Skin extends ContextSource {
                return $bottomScriptText;
        }
 
-       /** @return string Retrievied from HTML text */
+       /**
+        * Text with the permalink to the source page,
+        * usually shown on the footer of a printed page
+        *
+        * @return string HTML text with an URL
+        */
        function printSource() {
-               $url = htmlspecialchars( $this->getTitle()->getFullURL() );
+               $oldid = $this->getRevisionId();
+               $url = htmlspecialchars( $this->getTitle()->getFullURL( 'oldid=' . $oldid ) );
                return wfMsg( 'retrievedfrom', '<a href="' . $url . '">' . $url . '</a>' );
        }