r76999 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76998‎ | r76999 | r77000 >
Date:01:40, 19 November 2010
Author:hartman
Status:ok
Tags:
Comment:
Followup to r76867. Only add canonical if there is no local page for the shared file.
Bug 25960
Modified paths:
  • /trunk/phase3/includes/ImagePage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
@@ -518,7 +518,8 @@
519519 $descUrl = $this->img->getDescriptionUrl();
520520 $descText = $this->img->getDescriptionText();
521521
522 - if( $descUrl ) {
 522+ /* Add canonical to head if there is no local page for this shared file */
 523+ if( $descUrl && $this->getID() == 0 ) {
523524 $wgOut->addLink( array( 'rel' => 'canonical', 'href' => $descUrl ) );
524525 }
525526

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76867When displaying non-local File pages, add link rel=canonical....hartman00:23, 17 November 2010

Status & tagging log