From: Roan Kattouw Date: Fri, 13 Feb 2009 16:17:39 +0000 (+0000) Subject: Add a tag on redirected page views per tag on redirected page views per --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5ce56ed5de..d3ab9e6a1f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -97,6 +97,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Add NUMBEROFACTIVEUSERS magic word, which is like NUMBEROFUSERS, but uses the active users data from site_stats. * (bug 13040) Gender-aware user namespace aliases +* Add a tag on redirected page views === Bug fixes in 1.15 === * (bug 16968) Special:Upload no longer throws useless warnings. diff --git a/includes/Article.php b/includes/Article.php index 28928fe29f..82e33889c5 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -836,6 +836,11 @@ class Article { $fragment = Xml::escapeJsString( $this->mTitle->getFragmentForURL() ); $wgOut->addInlineScript( "redirectToFragment(\"$fragment\");" ); } + + // Add a tag + $wgOut->addLink( array( 'rel' => 'canonical', + 'href' => $this->mTitle->getFullURL() ) + ); $wasRedirected = true; } } elseif( !empty( $rdfrom ) ) {