Ignore:
Timestamp:
Sep 14, 2009 2:29:12 AM (4 years ago)
Author:
alec
Message:
  • simplify html_editor hook
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/main.inc

    r2951 r2954  
    13811381  global $RCMAIL, $CONFIG; 
    13821382 
     1383  $hook = $RCMAIL->plugins->exec_hook('hmtl_editor', array('mode' => $mode)); 
     1384 
     1385  if ($hook['abort']) 
     1386    return;   
     1387 
    13831388  $lang = strtolower(substr($_SESSION['language'], 0, 2)); 
    13841389  if (!file_exists(INSTALL_PATH . 'program/js/tiny_mce/langs/'.$lang.'.js')) 
    13851390    $lang = 'en'; 
    13861391 
    1387   $hook = $RCMAIL->plugins->exec_hook('hmtl_editor', array('abort' => false, 
    1388     'mode' => $mode, 'lang' => $lang)); 
    1389  
    1390   if ($hook['abort']) 
    1391     return;   
    1392  
    13931392  $RCMAIL->output->include_script('tiny_mce/tiny_mce.js'); 
    13941393  $RCMAIL->output->include_script('editor.js'); 
    13951394  $RCMAIL->output->add_script('rcmail_editor_init("$__skin_path", 
    1396     "'.JQ($hook['lang']).'", '.intval($CONFIG['enable_spellcheck']).', "'.$hook['mode'].'");'); 
     1395    "'.JQ($lang).'", '.intval($CONFIG['enable_spellcheck']).', "'.$mode.'");'); 
    13971396} 
    13981397 
Note: See TracChangeset for help on using the changeset viewer.