Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -898,6 +898,7 @@ |
899 | 899 | $title: Title object of page |
900 | 900 | $url: string value as output (out parameter, can modify) |
901 | 901 | $query: query options passed to Title::getCanonicalURL() |
| 902 | +$variant: variant passed to Title::getCanonicalURL() |
902 | 903 | |
903 | 904 | 'GetDefaultSortkey': Override the default sortkey for a page. |
904 | 905 | $title: Title object that we need to get a sortkey for |
— | — | @@ -907,11 +908,13 @@ |
908 | 909 | $title: Title object of page |
909 | 910 | $url: string value as output (out parameter, can modify) |
910 | 911 | $query: query options passed to Title::getFullURL() |
| 912 | +$variant: variant passed to Title::getFullURL() |
911 | 913 | |
912 | 914 | 'GetInternalURL': modify fully-qualified URLs used for squid cache purging |
913 | 915 | $title: Title object of page |
914 | 916 | $url: string value as output (out parameter, can modify) |
915 | 917 | $query: query options passed to Title::getInternalURL() |
| 918 | +$variant: variant passed to Title::getFullURL() |
916 | 919 | |
917 | 920 | 'GetIP': modify the ip of the current user (called only once) |
918 | 921 | &$ip: string holding the ip as determined so far |
— | — | @@ -930,13 +933,13 @@ |
931 | 934 | $title: Title object of page |
932 | 935 | &$url: string value as output (out parameter, can modify) |
933 | 936 | $query: query options passed to Title::getLocalURL() |
934 | | -$variant: variant options passed to Title::getLocalURL() |
| 937 | +$variant: variant passed to Title::getLocalURL() |
935 | 938 | |
936 | 939 | 'GetLocalURL::Internal': modify local URLs to internal pages. |
937 | 940 | $title: Title object of page |
938 | 941 | &$url: string value as output (out parameter, can modify) |
939 | 942 | $query: query options passed to Title::getLocalURL() |
940 | | -$variant: variant options passed to Title::getLocalURL() |
| 943 | +$variant: variant passed to Title::getLocalURL() |
941 | 944 | |
942 | 945 | 'GetLocalURL::Article': modify local URLs specifically pointing to article paths |
943 | 946 | without any fancy queries or variants. |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -860,7 +860,7 @@ |
861 | 861 | # Finally, add the fragment. |
862 | 862 | $url .= $this->getFragmentForURL(); |
863 | 863 | |
864 | | - wfRunHooks( 'GetFullURL', array( &$this, &$url, $query ) ); |
| 864 | + wfRunHooks( 'GetFullURL', array( &$this, &$url, $query, $variant ) ); |
865 | 865 | return $url; |
866 | 866 | } |
867 | 867 | |
— | — | @@ -1028,7 +1028,7 @@ |
1029 | 1029 | $server = $wgInternalServer !== false ? $wgInternalServer : $wgServer; |
1030 | 1030 | } |
1031 | 1031 | $url = wfExpandUrl( $server . $this->getLocalURL( $query, $variant ), PROTO_HTTP ); |
1032 | | - wfRunHooks( 'GetInternalURL', array( &$this, &$url, $query ) ); |
| 1032 | + wfRunHooks( 'GetInternalURL', array( &$this, &$url, $query, $variant ) ); |
1033 | 1033 | return $url; |
1034 | 1034 | } |
1035 | 1035 | |
— | — | @@ -1046,7 +1046,7 @@ |
1047 | 1047 | public function getCanonicalURL( $query = '', $variant = false ) { |
1048 | 1048 | global $wgCanonicalServer; |
1049 | 1049 | $url = wfExpandUrl( $this->getLocalURL( $query, $variant ) . $this->getFragmentForURL(), PROTO_CANONICAL ); |
1050 | | - wfRunHooks( '', array( &$this, &$url, $query ) ); |
| 1050 | + wfRunHooks( 'GetCanonicalURL', array( &$this, &$url, $query, $variant ) ); |
1051 | 1051 | return $url; |
1052 | 1052 | } |
1053 | 1053 | |