Changeset 5d2b7fd in github


Ignore:
Timestamp:
Aug 15, 2008 6:35:09 AM (5 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
d4c01ca
Parents:
ac5d15d
Message:

Added pspell support patch by Kris Steinhoff (#1483960)

Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rac5d15d r5d2b7fd  
    22--------------------------- 
    33 
    4 2008/08/14 (thomasb) 
     42008/08/15 (thomasb) 
    55---------- 
    66- Use current mailbox name in template (#1485256) 
    77- Better fix for skipping untagged responses (#1485261) 
     8- Added pspell support patch by Kris Steinhoff (#1483960) 
    89 
    9102008/08/09 (alec) 
  • config/main.inc.php.dist

    r522007b r5d2b7fd  
    190190$rcmail_config['enable_spellcheck'] = TRUE; 
    191191 
     192// Set the spell checking engine. 'googie' is the default. 'pspell' is also available, 
     193// but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here. 
     194$rcmail_config['spellcheck_engine'] = 'googie'; 
     195 
    192196// For a locally installed Nox Spell Server, please specify the URI to call it. 
    193197// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72 
     
    198202// These languages can be selected for spell checking. 
    199203// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch'); 
    200 // Leave empty for default set of Google spell check languages 
     204// Leave empty for default set of Google spell check languages, should be defined 
     205// when using local Pspell extension 
    201206$rcmail_config['spellcheck_languages'] = NULL; 
    202207 
  • program/steps/mail/spell.inc

    r5349b78 r5d2b7fd  
    66 |                                                                       | 
    77 | This file is part of the RoundCube Webmail client                     | 
    8  | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 | 
    98 | Licensed under the GNU GPL                                            | 
    109 |                                                                       | 
    1110 | PURPOSE:                                                              | 
    12  |   Submit request to Google's spell checking engine                    | 
    13  |                                                                       | 
    14  | CREDITS:                                                              | 
    15  |   Script from GoogieSpell by amix.dk                                  | 
     11 |   Invoke the configured or default spell checking engine.             | 
    1612 |                                                                       | 
    1713 +-----------------------------------------------------------------------+ 
    18  | Author: Thomas Bruederli <roundcube@gmail.com>                        | 
     14 | Author: Kris Steinhoff <steinhof@umich.edu>                           | 
    1915 +-----------------------------------------------------------------------+ 
    2016 
     
    2319*/ 
    2420 
    25 $REMOTE_REQUEST = TRUE; 
     21if ($spell_engine = $RCMAIL->config->get('spellcheck_engine', 'googie')) { 
     22    include('spell_'.$spell_engine.'.inc'); 
     23} 
    2624 
    27 // default settings 
    28 $host = "ssl://www.google.com"; 
    29 $port = 443; 
    30 $lang = get_input_value('lang', RCUBE_INPUT_GET); 
    31 $path = "/tbproxy/spell?lang=$lang"; 
    32  
    33 // spell check uri is configured 
    34 if (!empty($CONFIG['spellcheck_uri'])) 
    35   { 
    36   $a_uri = parse_url($CONFIG['spellcheck_uri']); 
    37   $ssl = ($a_uri['scheme']=='https' || $a_uri['scheme']=='ssl'); 
    38   $port = $a_uri['port'] ? $a_uri['port'] : ($ssl ? 443 : 80); 
    39   $host = ($ssl ? 'ssl://' : '') . $a_uri['host']; 
    40   $path = $a_uri['path'] . ($a_uri['query'] ? '?'.$a_uri['query'] : '') . $lang; 
    41   } 
    42  
    43 $data = file_get_contents('php://input'); 
    44 $store = ""; 
    45  
    46 if ($fp = fsockopen($host, $port, $errno, $errstr, 30)) 
    47   { 
    48   $out = "POST $path HTTP/1.0\r\n"; 
    49   $out .= "Host: $host\r\n"; 
    50   $out .= "Content-Length: " . strlen($data) . "\r\n"; 
    51   $out .= "Content-type: application/x-www-form-urlencoded\r\n"; 
    52   $out .= "Connection: Close\r\n\r\n"; 
    53   $out .= $data; 
    54   fwrite($fp, $out); 
    55    
    56   while (!feof($fp)) 
    57     $store .= fgets($fp, 128); 
    58   fclose($fp); 
    59   } 
    60  
    61 print $store;   
     25header('HTTP/1.1 404 Not Found'); 
    6226exit; 
    6327 
Note: See TracChangeset for help on using the changeset viewer.