dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04b2b29
)
Followup to r76867. Only add canonical if there is no local page for the shared file.
author
Derk-Jan Hartman
<hartman@users.mediawiki.org>
Fri, 19 Nov 2010 01:40:56 +0000
(
01:40
+0000)
committer
Derk-Jan Hartman
<hartman@users.mediawiki.org>
Fri, 19 Nov 2010 01:40:56 +0000
(
01:40
+0000)
Bug 25960
includes/ImagePage.php
patch
|
blob
|
history
diff --git
a/includes/ImagePage.php
b/includes/ImagePage.php
index
04ed3ce
..
a1b204f
100644
(file)
--- a/
includes/ImagePage.php
+++ b/
includes/ImagePage.php
@@
-518,7
+518,8
@@
EOT
$descUrl = $this->img->getDescriptionUrl();
$descText = $this->img->getDescriptionText();
- if( $descUrl ) {
+ /* Add canonical to head if there is no local page for this shared file */
+ if( $descUrl && $this->getID() == 0 ) {
$wgOut->addLink( array( 'rel' => 'canonical', 'href' => $descUrl ) );
}