r96427 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96426‎ | r96427 | r96428 >
Date:12:56, 7 September 2011
Author:raymond
Status:ok (Comments)
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -624,7 +624,12 @@
625625 */
626626 function printSource() {
627627 $oldid = $this->getRevisionId();
628 - $url = htmlspecialchars( $this->getTitle()->getFullURL( 'oldid=' . $oldid ) );
 628+ if ( $oldid ) {
 629+ $url = htmlspecialchars( $this->getTitle()->getCanonicalURL( 'oldid=' . $oldid ) );
 630+ } else {
 631+ // oldid not available for non existing pages
 632+ $url = htmlspecialchars( $this->getTitle()->getCanonicalURL() );
 633+ }
629634 return wfMsg( 'retrievedfrom', '<a href="' . $url . '">' . $url . '</a>' );
630635 }
631636

Follow-up revisions

RevisionCommit summaryAuthorDate
r964761.17wmf1: partial MFT of r96427catrope19:40, 7 September 2011
r965121.18: MFT r95655, r96227, r96386, r96393, r96405, r96427, r96460, r96472. And...catrope22:18, 7 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95655* (bug 16428) Include permalink in printable versionraymond10:47, 29 August 2011

Comments

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

Revision tagged with 1.17wmf1 for the use of getCanonicalURL() only. See r95655 for the original line

Status & tagging log