Follow-up to r47217 "Add a <link rel="canonical"> tag on redirected page views per...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 17 Feb 2009 22:51:19 +0000 (22:51 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 17 Feb 2009 22:51:19 +0000 (22:51 +0000)
We can use a relative link in the HTML here and save a few bytes of output; consumer is required to be able to expand relative links it finds here.

includes/Article.php

index e3c5706..eeaca04 100644 (file)
@@ -839,7 +839,7 @@ class Article {
 
                                // Add a <link rel="canonical"> tag
                                $wgOut->addLink( array( 'rel' => 'canonical',
-                                       'href' => $this->mTitle->getFullURL() )
+                                       'href' => $this->mTitle->getLocalURL() )
                                );
                                $wasRedirected = true;
                        }