r76867 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76866‎ | r76867 | r76868 >
Date:00:23, 17 November 2010
Author:hartman
Status:ok
Tags:
Comment:
When displaying non-local File pages, add link rel=canonical.
Solves bug 25960
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/ImagePage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
@@ -518,6 +518,10 @@
519519 $descUrl = $this->img->getDescriptionUrl();
520520 $descText = $this->img->getDescriptionText();
521521
 522+ if( $descUrl ) {
 523+ $wgOut->addLink( array( 'rel' => 'canonical', 'href' => $descUrl ) );
 524+ }
 525+
522526 $wrap = "<div class=\"sharedUploadNotice\">\n$1\n</div>\n";
523527 $repo = $this->img->getRepo()->getDisplayName();
524528
Index: trunk/phase3/RELEASE-NOTES
@@ -204,6 +204,8 @@
205205 * (bug 22463) Add hook 'SkinGetPoweredBy' to make 'powered by' icon/text
206206 customizable
207207 * Added CSS print pagination to the print stylesheets
 208+* (bug 25960) Add <link rel=canonical"> for File pages of shared/foreign
 209+ file repositories.
208210
209211 === Bug fixes in 1.17 ===
210212 * (bug 17560) Half-broken deletion moved image files to deletion archive

Follow-up revisions

RevisionCommit summaryAuthorDate
r76999Followup to r76867. Only add canonical if there is no local page for the shar...hartman01:40, 19 November 2010

Status & tagging log