Followup r96180, I can't believe I did't notice I accidentally killed the hook name.

While I'm at it, add missing $variant parameters to every 'Get*URL' hook in Title.
This commit is contained in:
Daniel Friesen 2011-09-05 08:31:51 +00:00
parent 76f3bb9227
commit 87e5fc82f8
2 changed files with 8 additions and 5 deletions

View 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.

View 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;
}