From: Daniel Friesen Date: Sat, 3 Sep 2011 13:17:55 +0000 (+0000) Subject: Use wfExpandUrl+PROTO_CANONICAL inside of getCanonicalURL instead of just prepending... X-Git-Tag: 1.31.0-rc.0~27938 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=0b46f1d616f613dbefeedd39075c64f4d2b4fd15;p=lhc%2Fweb%2Fwiklou.git Use wfExpandUrl+PROTO_CANONICAL inside of getCanonicalURL instead of just prepending the url so this does not break on interwiki and action=render --- 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; }