Use wfExpandUrl+PROTO_CANONICAL inside of getCanonicalURL instead of just prepending...
authorDaniel Friesen <dantman@users.mediawiki.org>
Sat, 3 Sep 2011 13:17:55 +0000 (13:17 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Sat, 3 Sep 2011 13:17:55 +0000 (13:17 +0000)
includes/Title.php

index 023b3d8..274bd25 100644 (file)
@@ -1045,8 +1045,8 @@ class Title {
         */
        public function getCanonicalURL( $query = '', $variant = false ) {
                global $wgCanonicalServer;
-               $url = $wgCanonicalServer . $this->getLocalURL( $query, $variant ) . $this->getFragmentForURL();
-               wfRunHooks( 'GetCanonicalURL', array( &$this, &$url, $query ) );
+               $url = wfExpandUrl( $this->getLocalURL( $query, $variant ) . $this->getFragmentForURL(), PROTO_CANONICAL );
+               wfRunHooks( '', array( &$this, &$url, $query ) );
                return $url;
        }