diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-07-31 19:26:12 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-07-31 19:26:12 +0200 |
commit | a2bd8ce7506a8286835dd5972a09fdf94c738046 (patch) | |
tree | 71688a2409c4dc73faf1cf10c03700074bdce073 /inc | |
parent | 36df6fa3069d55db3c35724c4f465bde9c50b53a (diff) | |
download | rpg-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 'inc')
-rw-r--r-- | inc/aspell.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/inc/aspell.php b/inc/aspell.php index 72d2f8b86..570656795 100644 --- a/inc/aspell.php +++ b/inc/aspell.php @@ -70,6 +70,7 @@ if(defined('PSPELL_COMP')){ class Aspell{ var $language = null; var $jargon = null; + var $personal = null; var $encoding = 'iso8859-1'; var $mode = PSPELL_NORMAL; var $version = 0; @@ -85,7 +86,6 @@ class Aspell{ $this->language = $language; $this->jargon = $jargon; $this->encoding = $encoding; - $this->_prepareArgs(); } /** @@ -101,7 +101,6 @@ class Aspell{ } $this->mode = $mode; - $this->_prepareArgs(); return $mode; } @@ -125,6 +124,10 @@ class Aspell{ $this->args .= ' --jargon='.escapeshellarg($this->jargon); } + if($this->personal != null){ + $this->args .= ' --personal='.escapeshellarg($this->personal); + } + if($this->encoding != null){ $this->args .= ' --encoding='.escapeshellarg($this->encoding); } @@ -160,6 +163,7 @@ class Aspell{ * @link http://aspell.sf.net/man-html/Through-A-Pipe.html */ function runAspell($text,&$out,&$err,$specials=null){ + $this->_prepareArgs(); if(empty($text)) return true; //prepare file descriptors $descspec = array( |