r91437 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91436‎ | r91437 | r91438 >
Date:05:30, 5 July 2011
Author:bawolff
Status:ok
Tags:
Comment:
(follow-up r91436) Make this extension use the new hook i just made.
Modified paths:
  • /trunk/extensions/CategorySortHeaders/CategorySortHeaders.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategorySortHeaders/CategorySortHeaders.php
@@ -48,7 +48,7 @@
4949 'author' => '[http://mediawiki.org/wiki/User:Bawolff Brian Wolff]',
5050 'descriptionmsg' => 'categorysortheaders-desc',
5151 'url' => 'http://www.mediawiki.org/wiki/Extension:CategorySortHeaders',
52 - 'version' => 0.1,
 52+ 'version' => 0.2,
5353 );
5454
5555 $dir = dirname( __FILE__ ) . '/';
@@ -62,3 +62,13 @@
6363 // php updateCollations.php --force
6464
6565 $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+}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91436(Follow-up r90759 per CR) Use a hook to register new Collations instead of ju...bawolff05:30, 5 July 2011

Status & tagging log