summaryrefslogtreecommitdiff
path: root/program/steps/utils/spell_html.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/utils/spell_html.inc')
-rw-r--r--program/steps/utils/spell_html.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/program/steps/utils/spell_html.inc b/program/steps/utils/spell_html.inc
index d69c73f37..2af30ba00 100644
--- a/program/steps/utils/spell_html.inc
+++ b/program/steps/utils/spell_html.inc
@@ -40,6 +40,10 @@ if ($request['method'] == 'checkWords') {
else if ($request['method'] == 'getSuggestions') {
$result['result'] = $spellchecker->get_suggestions($data);
}
+else if ($request['method'] == 'learnWord') {
+ $spellchecker->add_word($data);
+ $result['result'] = true;
+}
if ($error = $spellchecker->error()) {
echo '{"error":{"errstr":"' . addslashes($error) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}';