summaryrefslogtreecommitdiff
path: root/program/steps/utils/spell_pspell.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-06-24 13:27:43 +0000
committeralecpl <alec@alec.pl>2010-06-24 13:27:43 +0000
commitf4f6291ec16bd2fe368f868e667ea2071c514098 (patch)
treee5d74a7168dfb1a4a015f6db4d7f10076f95b515 /program/steps/utils/spell_pspell.inc
parent2011bef155aacdfa8461a4d5c2cd3988d946d135 (diff)
- Use built-in spellchecker instead of a PHP files of spellchecker plugin in TinyMCE
Diffstat (limited to 'program/steps/utils/spell_pspell.inc')
-rw-r--r--program/steps/utils/spell_pspell.inc5
1 files changed, 1 insertions, 4 deletions
diff --git a/program/steps/utils/spell_pspell.inc b/program/steps/utils/spell_pspell.inc
index 2c9c2333c..58720ff42 100644
--- a/program/steps/utils/spell_pspell.inc
+++ b/program/steps/utils/spell_pspell.inc
@@ -30,9 +30,6 @@ if (!extension_loaded('pspell')) {
exit;
}
-// max. number of suggestions for one word
-define('MAX_SUGGESTIONS', 10);
-
// read input
$data = file_get_contents('php://input');
@@ -59,7 +56,7 @@ foreach ($words as $w) {
if ($word && $plink && preg_match('/[^0-9\.]/', $word)
&& !pspell_check($plink, $word)) {
$suggestions = pspell_suggest($plink, $word);
- if (sizeof($suggestions)>10)
+ if (sizeof($suggestions)>MAX_SUGGESTIONS)
$suggestions = array_slice($suggestions, 0, MAX_SUGGESTIONS);
$out .= '<c o="'.$pos.'" l="'.$len.'">';