version 1.2, 2012/08/27 11:09:56
|
version 1.4, 2012/09/10 09:51:06
|
Line 76 sub spell_check {
|
Line 76 sub spell_check {
|
|
|
# Turn the words into an array: |
# Turn the words into an array: |
|
|
my @word_list = split(/\s+/, $words); |
my @word_list = split(/\+/, $words); |
|
|
my @mis_spelled; |
my @mis_spelled; |
foreach my $word (@word_list) { |
foreach my $word (@word_list) { |
Line 124 sub handler {
|
Line 124 sub handler {
|
} else { |
} else { |
$raw_params = $r->args(); |
$raw_params = $r->args(); |
} |
} |
|
|
|
|
my $query = CGI->new($raw_params); |
my $query = CGI->new($raw_params); |
|
|
# Figure out the language defaulting to english. |
# Figure out the language defaulting to english. |
Line 148 sub handler {
|
Line 150 sub handler {
|
} elsif ($query->param('suggest')) { |
} elsif ($query->param('suggest')) { |
$data = &suggest_spellings($query->param('suggest'), $language); |
$data = &suggest_spellings($query->param('suggest'), $language); |
} else { |
} else { |
die "Invalid request"; |
$data = "[]"; # We seem to get this from time to time. |
} |
} |
$r->print($data); |
$r->print($data); |
|
|