From 0b46f1d616f613dbefeedd39075c64f4d2b4fd15 Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Sat, 3 Sep 2011 13:17:55 +0000 Subject: [PATCH] Use wfExpandUrl+PROTO_CANONICAL inside of getCanonicalURL instead of just prepending the url so this does not break on interwiki and action=render --- includes/Title.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 023b3d88fe..274bd2556b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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; } -- 2.20.1