]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/steps/utils/spell_html.inc
Imported Upstream version 0.7
[roundcube.git] / program / steps / utils / spell_html.inc
index d0324c6176174f36aa6be59ef4341e44f09e3b47..4567e13ba83a227205067c5d52d39dcb36d56c13 100644 (file)
@@ -15,7 +15,7 @@
  | Author: Aleksander Machniak <alec@alec.pl>                            |
  +-----------------------------------------------------------------------+
 
- $Id: spell_html.inc 4815 2011-05-30 15:08:26Z alec $
+ $Id: spell_html.inc 5181 2011-09-06 13:39:45Z alec $
 
 */
 
@@ -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"}}';