Changeset f4f6291 in github


Ignore:
Timestamp:
Jun 24, 2010 9:27:43 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
6052766
Parents:
2011bef
Message:
  • Use built-in spellchecker instead of a PHP files of spellchecker plugin in TinyMCE
Location:
program
Files:
2 added
10 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • program/js/editor.js

    r1f019c8 rf4f6291  
    5353      external_image_list_url : 'program/js/editor_images.js', 
    5454      spellchecker_languages : (rcmail.env.spellcheck_langs ? rcmail.env.spellcheck_langs : 'Dansk=da,Deutsch=de,+English=en,Espanol=es,Francais=fr,Italiano=it,Nederlands=nl,Polski=pl,Portugues=pt,Suomi=fi,Svenska=sv'), 
     55      spellchecker_rpc_url : '?_task=utils&_action=spell&tiny=1', 
    5556      gecko_spellcheck : true, 
    5657      relative_urls : false, 
  • program/steps/utils/spell.inc

    rb25dfd0 rf4f6291  
    1919*/ 
    2020 
     21// max. number of suggestions for one word 
     22define('MAX_SUGGESTIONS', 10); 
     23 
     24$tiny = !empty($_GET['tiny']) ? 'html_' : ''; 
     25 
    2126if ($spell_engine = $RCMAIL->config->get('spellcheck_engine', 'googie')) { 
    22     include('spell_'.$spell_engine.'.inc'); 
     27    include('spell_'.$tiny.$spell_engine.'.inc'); 
    2328} 
    2429 
     
    2631exit; 
    2732 
    28  
  • program/steps/utils/spell_googie.inc

    rb25dfd0 rf4f6291  
    33/* 
    44 +-----------------------------------------------------------------------+ 
    5  | program/steps/utils/spell.inc                                         | 
     5 | program/steps/utils/spell_googie.inc                                  | 
    66 |                                                                       | 
    77 | This file is part of the RoundCube Webmail client                     | 
     
    5353  $out .= $data; 
    5454  fwrite($fp, $out); 
    55    
     55 
    5656  while (!feof($fp)) 
    5757    $store .= fgets($fp, 128); 
  • program/steps/utils/spell_pspell.inc

    rb25dfd0 rf4f6291  
    3131} 
    3232 
    33 // max. number of suggestions for one word 
    34 define('MAX_SUGGESTIONS', 10); 
    35  
    3633// read input 
    3734$data = file_get_contents('php://input'); 
     
    6057        && !pspell_check($plink, $word)) { 
    6158        $suggestions = pspell_suggest($plink, $word); 
    62         if (sizeof($suggestions)>10) 
     59        if (sizeof($suggestions)>MAX_SUGGESTIONS) 
    6360          $suggestions = array_slice($suggestions, 0, MAX_SUGGESTIONS); 
    6461 
Note: See TracChangeset for help on using the changeset viewer.