r95655 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95654‎ | r95655 | r95656 >
Date:10:47, 29 August 2011
Author:raymond
Status:resolved (Comments)
Tags:
Comment:
* (bug 16428) Include permalink in printable version
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -50,6 +50,7 @@
5151 * Hook added to check for exempt from account creation throttle
5252 * (bug 30344) Add configuration variable for setting custom priorities when
5353 generating sitemaps
 54+* (bug 16428) Include permalink in printable version
5455
5556 === Bug fixes in 1.19 ===
5657 * $wgUploadNavigationUrl should be used for file redlinks if
Index: trunk/phase3/includes/Skin.php
@@ -616,9 +616,15 @@
617617 return $bottomScriptText;
618618 }
619619
620 - /** @return string Retrievied from HTML text */
 620+ /**
 621+ * Text with the permalink to the source page,
 622+ * usually shown on the footer of a printed page
 623+ *
 624+ * @return string HTML text with an URL
 625+ */
621626 function printSource() {
622 - $url = htmlspecialchars( $this->getTitle()->getFullURL() );
 627+ $oldid = $this->getRevisionId();
 628+ $url = htmlspecialchars( $this->getTitle()->getFullURL( 'oldid=' . $oldid ) );
623629 return wfMsg( 'retrievedfrom', '<a href="' . $url . '">' . $url . '</a>' );
624630 }
625631

Follow-up revisions

RevisionCommit summaryAuthorDate
r96427Fix r95655 per Formfix's CR:...raymond12:56, 7 September 2011
r965121.18: MFT r95655, r96227, r96386, r96393, r96405, r96427, r96460, r96472. And...catrope22:18, 7 September 2011
r102387clean RN 1.19 of bugs merged in 1.18...hashar10:54, 8 November 2011

Comments

#Comment by Fomafix (talk | contribs)   20:31, 6 September 2011

The link text doesn't contain an URI scheme. It should use getCanonicalURL() instead of getFullURL().

http://translatewiki.net/wiki/File:Köln_Panorama.jpg doesn't have an oldid. The printable version contains „//translatewiki.net/w/i.php?title=File:K%C3%B6ln_Panorama.jpg&oldid=“. It is better to use the normal link without oldid (http://translatewiki.net/wiki/File:Köln_Panorama.jpg) when oldid is empty.

#Comment by Raymond (talk | contribs)   20:42, 6 September 2011

Thanks for review. I will look into it.

#Comment by Raymond (talk | contribs)   13:05, 7 September 2011

Fixed with r96427

Status & tagging log