From fbf89913a30490096981be65764b6f9fce53cd47 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 19 Jul 2016 12:05:41 +0200 Subject: [PATCH] Fix missing localization of HTML editor when assets_dir != INSTALL_PATH Conflicts: CHANGELOG --- CHANGELOG | 1 + program/include/rcmail.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index d5c767aac..dda311adc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ CHANGELOG Roundcube Webmail - Searching in both contacts and groups when LDAP addressbook with group_filters option is used - Use contact_search_name format in popup on results in compose contacts search +- Fix missing localization of HTML editor when assets_dir != INSTALL_PATH - Fix message list multi-select/deselect issue (#5219) - Fix bug where contact search menu fields where always unchecked in Larry skin - Fix XSS issue in href attribute on area tag (#5240) diff --git a/program/include/rcmail.php b/program/include/rcmail.php index a6a61a34a..037761f76 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -1867,13 +1867,14 @@ class rcmail extends rcube } $lang_codes = array($_SESSION['language']); + $assets_dir = $this->config->get('assets_dir') ?: INSTALL_PATH; if ($pos = strpos($_SESSION['language'], '_')) { $lang_codes[] = substr($_SESSION['language'], 0, $pos); } foreach ($lang_codes as $code) { - if (file_exists(INSTALL_PATH . 'program/js/tinymce/langs/'.$code.'.js')) { + if (file_exists("$assets_dir/program/js/tinymce/langs/$code.js")) { $lang = $code; break; }