From c944cde4d05164b6271b4f3acbbe2855e31b1a97 Mon Sep 17 00:00:00 2001 From: thomascube Date: Fri, 18 May 2007 13:11:22 +0000 Subject: Removed HTML editor and disabled preview pane --- .../js/tiny_mce/plugins/spellchecker/tinyspell.php | 142 --------------------- 1 file changed, 142 deletions(-) delete mode 100644 program/js/tiny_mce/plugins/spellchecker/tinyspell.php (limited to 'program/js/tiny_mce/plugins/spellchecker/tinyspell.php') diff --git a/program/js/tiny_mce/plugins/spellchecker/tinyspell.php b/program/js/tiny_mce/plugins/spellchecker/tinyspell.php deleted file mode 100644 index 18345e65b..000000000 --- a/program/js/tiny_mce/plugins/spellchecker/tinyspell.php +++ /dev/null @@ -1,142 +0,0 @@ -'; - die; - } - - // Basic config - $defaultLanguage = $spellCheckerConfig['default.language']; - $defaultMode = $spellCheckerConfig['default.mode']; - - // Normaly not required to configure - $defaultSpelling = $spellCheckerConfig['default.spelling']; - $defaultJargon = $spellCheckerConfig['default.jargon']; - $defaultEncoding = $spellCheckerConfig['default.encoding']; - $outputType = "xml"; // Do not change - - // Get input parameters. - - $check = urldecode($_REQUEST['check']); - $cmd = sanitize($_REQUEST['cmd']); - $lang = sanitize($_REQUEST['lang'], "strict"); - $mode = sanitize($_REQUEST['mode'], "strict"); - $spelling = sanitize($_REQUEST['spelling'], "strict"); - $jargon = sanitize($_REQUEST['jargon'], "strict"); - $encoding = sanitize($_REQUEST['encoding'], "strict"); - $sg = sanitize($_REQUEST['sg'], "bool"); - $words = array(); - - $validRequest = true; - - if (empty($check)) - $validRequest = false; - - if (empty($lang)) - $lang = $defaultLanguage; - - if (empty($mode)) - $mode = $defaultMode; - - if (empty($spelling)) - $spelling = $defaultSpelling; - - if (empty($jargon)) - $jargon = $defaultJargon; - - if (empty($encoding)) - $encoding = $defaultEncoding; - - function sanitize($str, $type="strict") { - switch ($type) { - case "strict": - $str = preg_replace("/[^a-zA-Z0-9_\-]/i", "", $str); - break; - case "loose": - $str = preg_replace("//i", "<", $str); - break; - case "bool": - if ($str == "true" || $str == true) - $str = true; - else - $str = false; - break; - } - - return $str; - } - - $result = array(); - $tinyspell = new $spellCheckerConfig['class']($spellCheckerConfig, $lang, $mode, $spelling, $jargon, $encoding); - - if (count($tinyspell->errorMsg) == 0) { - switch($cmd) { - case "spell": - // Space for non-exec version and \n for the exec version. - $words = preg_split("/ |\n/", $check, -1, PREG_SPLIT_NO_EMPTY); - $result = $tinyspell->checkWords($words); - break; - - case "suggest": - $result = $tinyspell->getSuggestion($check); - break; - - default: - // Just use this for now. - $tinyspell->errorMsg[] = "No command."; - $outputType = $outputType . "error"; - break; - } - } else - $outputType = $outputType . "error"; - - if (!$result) - $result = array(); - - // Output data - switch($outputType) { - case "xml": - header('Content-type: text/xml; charset=utf-8'); - $body = ''; - $body .= "\n"; - - if (count($result) == 0) - $body .= ''; - else - $body .= ''. urlencode(implode(" ", $result)) .''; - - echo $body; - break; - case "xmlerror"; - header('Content-type: text/xml; charset=utf-8'); - $body = ''; - $body .= "\n"; - $body .= 'errorMsg) .'" />'; - echo $body; - break; - case "html": - var_dump($result); - break; - case "htmlerror": - echo "Error"; - break; - } - -?> -- cgit v1.2.3