Fixup a few minor documentation issues

Added some newlines

Left a FIXME in LanguageNameIndexer.php

Losslessly compressed display.png

Change-Id: I884b423d3812ddb964a6a70f75a6331a73371165
This commit is contained in:
Reedy
2012-08-19 01:19:46 +01:00
parent 08eb45509b
commit 0f0732f865
4 changed files with 13 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ class LanguageNameIndexer extends Maintenance {
foreach ( $languages as $code => $name ) {
$all[$code][strtolower( $name )] = true;
$langnames = LanguageNames::getNames( $code, 0, 2 );
foreach ( $langnames as $code => $name ) {
foreach ( $langnames as $code => $name ) { // FIXME: Variable pollution
$all[$code][] = strtolower( $name );
}
}

View File

@@ -19,9 +19,11 @@
*/
class LanguageNameSearch {
static $languagenames;
public static function init() {
self::$languagenames = unserialize( file_get_contents( __DIR__ . '/langnames.ser' ) );
}
public static function search( $searchKey, $typos = 0 ) {
if ( self::$languagenames === null ) {
self::init();
@@ -61,6 +63,7 @@ class LanguageNameSearch {
/**
* Get the code point of first letter of string
*
* @param $str string
* @return integer Code point of first letter of string
*/
static function getCodepoint( $str ) {
@@ -84,6 +87,7 @@ class LanguageNameSearch {
}
}
}
/**
* Calculate the Levenshtein distance between two strings
* @param $str1