svncommit
2007-05-23 2c633703e97eb6e7aa7ba840ef86b1fc1bd98ada
program/js/tiny_mce/plugins/spellchecker/classes/TinyGoogleSpell.class.php
@@ -1,4 +1,5 @@
<?php
/* *
 * Tiny Spelling Interface for TinyMCE Spell Checking.
 *
@@ -7,9 +8,11 @@
class TinyGoogleSpell {
   var $lang;
   var $spellurl;
   function TinyGoogleSpell(&$config, $lang, $mode, $spelling, $jargon, $encoding) {
      $this->lang = $lang;
      $this->spellurl = $config['googlespell.url'];
   }
   // Returns array with bad words or false if failed.
@@ -57,11 +60,9 @@
   }
   function _getMatches($word_list) {
        $server = "www.google.com";
        $port = 443;
        $path = "/tbproxy/spell?lang=" . $this->lang . "&hl=en";
        $host = "www.google.com";
        $url = "https://" . $server;
      $url = $this->spellurl . "&" . $this->lang;
      $path = preg_replace("/^https?:\/\//i", "", $url);
      // Setup XML request
      $xml = '<?xml version="1.0" encoding="utf-8" ?><spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1"><text>' . $word_list . '</text></spellrequest>';
@@ -103,5 +104,4 @@
// Setup classname, should be the same as the name of the spellchecker class
$spellCheckerConfig['class'] = "TinyGoogleSpell";
?>