MediaWiki
REL1_24
|
00001 <?php 00033 // @codingStandardsIgnoreStart Ignore class name is not in camel caps format error 00034 class LanguageBe_tarask extends Language { 00035 // @codingStandardsIgnoreEnd 00046 function normalizeForSearch( $string ) { 00047 wfProfileIn( __METHOD__ ); 00048 00049 # MySQL fulltext index doesn't grok utf-8, so we 00050 # need to fold cases and convert to hex 00051 00052 # Replacing apostrophe sign U+2019 with U+0027 00053 $s = preg_replace( '/\xe2\x80\x99/', '\'', $string ); 00054 00055 $s = parent::normalizeForSearch( $s ); 00056 00057 wfProfileOut( __METHOD__ ); 00058 return $s; 00059 } 00060 00069 function commafy( $_ ) { 00070 if ( preg_match( '/^-?\d{1,4}(\.\d*)?$/', $_ ) ) { 00071 return $_; 00072 } else { 00073 return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) ); 00074 } 00075 } 00076 }