Followup r96180, I can't believe I did't notice I accidentally killed the hook name.
authorDaniel Friesen <dantman@users.mediawiki.org>
Mon, 5 Sep 2011 08:31:51 +0000 (08:31 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Mon, 5 Sep 2011 08:31:51 +0000 (08:31 +0000)
While I'm at it, add missing $variant parameters to every 'Get*URL' hook in Title.

docs/hooks.txt
includes/Title.php

index 44a01b5..9877950 100644 (file)
@@ -898,6 +898,7 @@ $out: OutputPage object
 $title: Title object of page
 $url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getCanonicalURL()
+$variant: variant passed to Title::getCanonicalURL()
 
 'GetDefaultSortkey': Override the default sortkey for a page.
 $title: Title object that we need to get a sortkey for
@@ -907,11 +908,13 @@ $title: Title object that we need to get a sortkey for
 $title: Title object of page
 $url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getFullURL()
+$variant: variant passed to Title::getFullURL()
 
 'GetInternalURL': modify fully-qualified URLs used for squid cache purging
 $title: Title object of page
 $url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getInternalURL()
+$variant: variant passed to Title::getFullURL()
 
 'GetIP': modify the ip of the current user (called only once)
 &$ip: string holding the ip as determined so far
@@ -930,13 +933,13 @@ $linkcolour_ids: array of prefixed DB keys of the pages linked to,
 $title: Title object of page
 &$url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getLocalURL()
-$variant: variant options passed to Title::getLocalURL()
+$variant: variant passed to Title::getLocalURL()
 
 'GetLocalURL::Internal': modify local URLs to internal pages.
 $title: Title object of page
 &$url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getLocalURL()
-$variant: variant options passed to Title::getLocalURL()
+$variant: variant passed to Title::getLocalURL()
 
 'GetLocalURL::Article': modify local URLs specifically pointing to article paths
        without any fancy queries or variants.
index 274bd25..8d1119c 100644 (file)
@@ -860,7 +860,7 @@ class Title {
                # Finally, add the fragment.
                $url .= $this->getFragmentForURL();
 
-               wfRunHooks( 'GetFullURL', array( &$this, &$url, $query ) );
+               wfRunHooks( 'GetFullURL', array( &$this, &$url, $query, $variant ) );
                return $url;
        }
 
@@ -1028,7 +1028,7 @@ class Title {
                        $server = $wgInternalServer !== false ? $wgInternalServer : $wgServer;
                }
                $url = wfExpandUrl( $server . $this->getLocalURL( $query, $variant ), PROTO_HTTP );
-               wfRunHooks( 'GetInternalURL', array( &$this, &$url, $query ) );
+               wfRunHooks( 'GetInternalURL', array( &$this, &$url, $query, $variant ) );
                return $url;
        }
 
@@ -1046,7 +1046,7 @@ class Title {
        public function getCanonicalURL( $query = '', $variant = false ) {
                global $wgCanonicalServer;
                $url = wfExpandUrl( $this->getLocalURL( $query, $variant ) . $this->getFragmentForURL(), PROTO_CANONICAL );
-               wfRunHooks( '', array( &$this, &$url, $query ) );
+               wfRunHooks( 'GetCanonicalURL', array( &$this, &$url, $query, $variant ) );
                return $url;
        }