LanguageNameIndexer/Search: use unicode aware lowercasing
With this MEÄNKELI with typos=1 finds results. Updated test case for lowercased result. Renamed variables in test file for clarity. Updated the default value for MW_INSTALL_PATH to work with the default layout. Change-Id: Id93c84d308705f55b4d2378fc8c7b7f243e1b53f
This commit is contained in:
@@ -29,8 +29,11 @@ class LanguageNameSearch {
|
||||
self::init();
|
||||
}
|
||||
|
||||
// Use code's mb_strtolower compatibily code for MW < 1.27
|
||||
$language = Language::factory( 'en' );
|
||||
|
||||
// @todo: Shouldn't this be unicode aware?
|
||||
$searchKey = strtolower( $searchKey );
|
||||
$searchKey = $language->lc( $searchKey );
|
||||
$index = self::getIndex( $searchKey );
|
||||
|
||||
if ( !isset( self::$languagenames[$index] ) ) {
|
||||
|
||||
Reference in New Issue
Block a user