X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/includes/collation/UppercaseCollation.php diff --git a/includes/collation/UppercaseCollation.php b/includes/collation/UppercaseCollation.php new file mode 100644 index 00000000..92a4c3b4 --- /dev/null +++ b/includes/collation/UppercaseCollation.php @@ -0,0 +1,44 @@ +lang = Language::factory( 'en' ); + } + + public function getSortKey( $string ) { + return $this->lang->uc( $string ); + } + + public function getFirstLetter( $string ) { + if ( $string[0] == "\0" ) { + $string = substr( $string, 1 ); + } + return $this->lang->ucfirst( $this->lang->firstChar( $string ) ); + } + +}