Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -518,7 +518,8 @@ |
519 | 519 | $descUrl = $this->img->getDescriptionUrl(); |
520 | 520 | $descText = $this->img->getDescriptionText(); |
521 | 521 | |
522 | | - if( $descUrl ) { |
| 522 | + /* Add canonical to head if there is no local page for this shared file */ |
| 523 | + if( $descUrl && $this->getID() == 0 ) { |
523 | 524 | $wgOut->addLink( array( 'rel' => 'canonical', 'href' => $descUrl ) ); |
524 | 525 | } |
525 | 526 | |