summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-09-14 06:29:12 +0000
committeralecpl <alec@alec.pl>2009-09-14 06:29:12 +0000
commitdc00400634fdfac61f49bccce3c9a9f262135d92 (patch)
treedafbd37ee1f36b447fe10a207d3fc8d622a45f70
parentc678da1dfe31706ba8de5ec62db9c15efd2558d7 (diff)
- simplify html_editor hook
-rw-r--r--program/include/main.inc13
1 files changed, 6 insertions, 7 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index e79cc0287..388b2a13b 100644
--- a/program/include/main.inc
+++ b/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.'");');
}