BUGFIX Only load existing languages in custom TinyMCE plugins to avoid the tinymce_gzip.php logic stalling (fixes #7035)

This commit is contained in:
Mateusz Uzdowski 2012-04-11 18:36:32 +02:00 committed by Ingo Schommer
parent 73a466c927
commit 03a8aa546e

View File

@ -1,5 +1,12 @@
(function() {
tinymce.PluginManager.requireLangPack("ssbuttons");
// TinyMCE will stop loading if it encounters non-existent external script file
// when included through tiny_mce_gzip.php. Only load the external lang package if it is available.
var availableLangs = ['en', 'de'];
if(jQuery.inArray(tinymce.settings.language, availableLangs) != -1) {
tinymce.PluginManager.requireLangPack("ssbuttons");
}
var each = tinymce.each;
tinymce.create('tinymce.plugins.SSButtons', {