diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-09-14 06:29:12 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-09-14 06:29:12 +0000 |
| commit | 8fc99a74d66ccbc9f55cc7f8cc1da753f8d043dd (patch) | |
| tree | a2677a2a2c538e1e3cb54631a2f416b952062ec9 /roundcubemail/program | |
| parent | ba08cfb6ba6d7217590fe9eafe142c3a93530abf (diff) | |
- simplify html_editor hook
git-svn-id: https://svn.roundcube.net/trunk@2954 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index e79cc0287..388b2a13b 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -1380,20 +1380,19 @@ function rcube_html_editor($mode='') { global $RCMAIL, $CONFIG; - $lang = strtolower(substr($_SESSION['language'], 0, 2)); - if (!file_exists(INSTALL_PATH . 'program/js/tiny_mce/langs/'.$lang.'.js')) - $lang = 'en'; - - $hook = $RCMAIL->plugins->exec_hook('hmtl_editor', array('abort' => false, - 'mode' => $mode, 'lang' => $lang)); + $hook = $RCMAIL->plugins->exec_hook('hmtl_editor', array('mode' => $mode)); if ($hook['abort']) return; + $lang = strtolower(substr($_SESSION['language'], 0, 2)); + if (!file_exists(INSTALL_PATH . 'program/js/tiny_mce/langs/'.$lang.'.js')) + $lang = 'en'; + $RCMAIL->output->include_script('tiny_mce/tiny_mce.js'); $RCMAIL->output->include_script('editor.js'); $RCMAIL->output->add_script('rcmail_editor_init("$__skin_path", - "'.JQ($hook['lang']).'", '.intval($CONFIG['enable_spellcheck']).', "'.$hook['mode'].'");'); + "'.JQ($lang).'", '.intval($CONFIG['enable_spellcheck']).', "'.$mode.'");'); } |
