Fix missing localization of HTML editor when assets_dir != INSTALL_PATH

pull/5754/head
Aleksander Machniak 8 years ago
parent 537aaa3d09
commit 073961a1b6

@ -26,6 +26,7 @@ CHANGELOG Roundcube Webmail
- Don't create multipart/alternative messages with empty text/plain part (#5283)
- Use contact_search_name format in popup on results in compose contacts search
- Fix handling of 'mailto' and 'error' arguments in message_before_send hook (#5347)
- Fix missing localization of HTML editor when assets_dir != INSTALL_PATH
RELEASE 1.2.0
-------------

@ -1917,13 +1917,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;
}

Loading…
Cancel
Save