Index: trunk/extensions/SphinxSearch/SphinxMWSearch.php |
— | — | @@ -271,7 +271,7 @@ |
272 | 272 | } |
273 | 273 | |
274 | 274 | function suggestWithAspell() { |
275 | | - global $wgUser, $wgSphinxSearchPersonalDictionary, $wgSphinxSearchAspellPath; |
| 275 | + global $wgLanguageCode, $wgSphinxSearchPersonalDictionary, $wgSphinxSearchAspellPath; |
276 | 276 | |
277 | 277 | // aspell will only return mis-spelled words, so remember all here |
278 | 278 | $words = $this->mTerms; |
— | — | @@ -283,10 +283,7 @@ |
284 | 284 | // prepare the system call with optional dictionary |
285 | 285 | $aspellcommand = 'echo ' . escapeshellarg( join( ' ', $words ) ) . |
286 | 286 | ' | ' . escapeshellarg( $wgSphinxSearchAspellPath ) . |
287 | | - ' -a --ignore-accents --ignore-case'; |
288 | | - if ( $wgUser ) { |
289 | | - $aspellcommand .= ' --lang=' . $wgUser->getDefaultOption( 'language' ); |
290 | | - } |
| 287 | + ' -a --ignore-accents --ignore-case --lang=' . $wgLanguageCode; |
291 | 288 | if ( $wgSphinxSearchPersonalDictionary ) { |
292 | 289 | $aspellcommand .= ' --home-dir=' . dirname( $wgSphinxSearchPersonalDictionary ); |
293 | 290 | $aspellcommand .= ' -p ' . basename( $wgSphinxSearchPersonalDictionary ); |