Index: trunk/phase3/includes/Article.php |
— | — | @@ -836,6 +836,11 @@ |
837 | 837 | $fragment = Xml::escapeJsString( $this->mTitle->getFragmentForURL() ); |
838 | 838 | $wgOut->addInlineScript( "redirectToFragment(\"$fragment\");" ); |
839 | 839 | } |
| 840 | + |
| 841 | + // Add a <link rel="canonical"> tag |
| 842 | + $wgOut->addLink( array( 'rel' => 'canonical', |
| 843 | + 'href' => $this->mTitle->getFullURL() ) |
| 844 | + ); |
840 | 845 | $wasRedirected = true; |
841 | 846 | } |
842 | 847 | } elseif( !empty( $rdfrom ) ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -97,6 +97,7 @@ |
98 | 98 | * Add NUMBEROFACTIVEUSERS magic word, which is like NUMBEROFUSERS, but uses |
99 | 99 | the active users data from site_stats. |
100 | 100 | * (bug 13040) Gender-aware user namespace aliases |
| 101 | +* Add a <link rel="canonical"> tag on redirected page views |
101 | 102 | |
102 | 103 | === Bug fixes in 1.15 === |
103 | 104 | * (bug 16968) Special:Upload no longer throws useless warnings. |