summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-07-31 19:26:12 +0200
committerAndreas Gohr <andi@splitbrain.org>2005-07-31 19:26:12 +0200
commita2bd8ce7506a8286835dd5972a09fdf94c738046 (patch)
tree71688a2409c4dc73faf1cf10c03700074bdce073 /lib
parent36df6fa3069d55db3c35724c4f465bde9c50b53a (diff)
downloadrpg-a2bd8ce7506a8286835dd5972a09fdf94c738046.tar.gz
rpg-a2bd8ce7506a8286835dd5972a09fdf94c738046.tar.bz2
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
Diffstat (limited to 'lib')
-rw-r--r--lib/exe/spellcheck.php5
1 files changed, 5 insertions, 0 deletions
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)){