Some people want it to default to subpage or to fullpagename this hook would let
them do what they want :)
* (bug 5800) Added $formCallback as a parameter to the hook
EditPage::showEditForm:initial
* (bug 29723) mw.util.wikiGetlink() now defaults to wgPageName.
+* (bug 29680) Add GetDefaultSortkey hook to override the default sortkey.
=== Bug fixes in 1.19 ===
* (bug 28868) Show total pages in the subtitle of an image on the
&$cookies: array of cookies name, add a value to it if you want to add a cookie
that have to vary cache options
+'GetDefaultSortkey': Override the default sortkey for a page.
+$title: Title object that we need to get a sortkey for
+&$sortkey: Sortkey to use.
+
'GetFullURL': modify fully-qualified URLs used in redirects/export/offsite data
$title: Title object of page
$url: string value as output (out parameter, can modify)
*/
public function getCategorySortkey( $prefix = '' ) {
$unprefixed = $this->getText();
+
+ // Anything that uses this hook should only depend
+ // on the Title object passed in, and should probably
+ // tell the users to run updateCollations.php --force
+ // in order to re-sort existing category relations.
+ wfRunHooks( 'GetDefaultSortkey', array( $this, &$unprefixed ) );
if ( $prefix !== '' ) {
# Separate with a line feed, so the unprefixed part is only used as
# a tiebreaker when two pages have the exact same prefix.