From f4f6291ec16bd2fe368f868e667ea2071c514098 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 24 Jun 2010 09:27:43 -0400
Subject: [PATCH] - Use built-in spellchecker instead of a PHP files of spellchecker plugin in TinyMCE

---
 program/steps/utils/spell_pspell.inc |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/program/steps/utils/spell_pspell.inc b/program/steps/utils/spell_pspell.inc
index 2c9c233..58720ff 100644
--- a/program/steps/utils/spell_pspell.inc
+++ b/program/steps/utils/spell_pspell.inc
@@ -30,9 +30,6 @@
     exit;
 }
 
-// max. number of suggestions for one word
-define('MAX_SUGGESTIONS', 10);
-
 // read input
 $data = file_get_contents('php://input');
 
@@ -59,7 +56,7 @@
     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.'">';

--
Gitblit v1.9.1