Index: trunk/extensions/CategorySortHeaders/CategorySortHeaders.php |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | 'author' => '[http://mediawiki.org/wiki/User:Bawolff Brian Wolff]', |
50 | 50 | 'descriptionmsg' => 'categorysortheaders-desc', |
51 | 51 | 'url' => 'http://www.mediawiki.org/wiki/Extension:CategorySortHeaders', |
52 | | - 'version' => 0.1, |
| 52 | + 'version' => 0.2, |
53 | 53 | ); |
54 | 54 | |
55 | 55 | $dir = dirname( __FILE__ ) . '/'; |
— | — | @@ -62,3 +62,13 @@ |
63 | 63 | // php updateCollations.php --force |
64 | 64 | |
65 | 65 | $wgCategorySortHeaderAppendPageNameToKey = true; |
| 66 | + |
| 67 | +$wgHooks['Collation::factory'][] = 'wfCategorySortHeadersSetup'; |
| 68 | + |
| 69 | +function wfCategorySortHeadersSetup( $collationName, &$collationObject ) { |
| 70 | + if ( $collationName === 'CustomHeaderCollation' ) { |
| 71 | + $collationObject = new CustomHeaderCollation; |
| 72 | + return false; |
| 73 | + } |
| 74 | + return true; |
| 75 | +} |