From a2bd8ce7506a8286835dd5972a09fdf94c738046 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 31 Jul 2005 19:26:12 +0200 Subject: Personal wordlist for spellchecker #488 This patch allows you to add a file named conf/words.aspell with your own words you don't want the spellchecker to choke on. Thanks to Steven Danz for code idea darcs-hash:20050731172612-7ad00-60fb3f09589c4758f1093f532de9699beb048569.gz --- lib/exe/spellcheck.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/exe/spellcheck.php b/lib/exe/spellcheck.php index 968e25395..4bb08fd88 100644 --- a/lib/exe/spellcheck.php +++ b/lib/exe/spellcheck.php @@ -58,6 +58,11 @@ header('Content-Type: text/plain; charset=utf-8'); $spell = new Aspell($conf['lang'],null,'utf-8'); $spell->setMode(PSPELL_FAST); +//add personal dictionary +if(@file_exists(DOKU_INC.'conf/words.aspell')){ + $spell->personal = DOKU_INC.'conf/words.aspell'; +} + //call the requested function $call = 'spell_'.$_POST['call']; if(function_exists($call)){ -- cgit v1.2.3