diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index af44b3689..2d599cb75 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1895,12 +1895,17 @@ define([ } }); - if (arr.length>0) + if (arr.length>0) { + var autostart = plugins.autostart || plugins.autoStartGuid; + if (typeof (autostart) == 'string') + autostart = [autostart]; + plugins.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); + this.updatePluginsList({ - autoStartGuid: plugins.autoStartGuid, - autostart: plugins.autostart, + autostart: autostart, pluginsData: arr }, !!uiCustomize); + } }, updatePluginsList: function(plugins, uiCustomize) { @@ -1962,10 +1967,7 @@ define([ } if (this.appOptions.canPlugins) { this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions); - if (plugins.autoStartGuid) { - console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); - this.api.asc_pluginRun(plugins.autoStartGuid, 0, ''); - } else if (plugins.autostart && plugins.autostart.length>0) { + if (plugins.autostart && plugins.autostart.length>0) { // run array of plugins this.api.asc_pluginRun(plugins.autostart[0], 0, ''); } diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 6a074a677..71a037986 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1664,12 +1664,17 @@ define([ } }); - if (arr.length>0) + if (arr.length>0) { + var autostart = plugins.autostart || plugins.autoStartGuid; + if (typeof (autostart) == 'string') + autostart = [autostart]; + plugins.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); + this.updatePluginsList({ - autoStartGuid: plugins.autoStartGuid, - autostart: plugins.autostart, + autostart: autostart, pluginsData: arr }, !!uiCustomize); + } }, updatePluginsList: function(plugins, uiCustomize) { @@ -1734,10 +1739,7 @@ define([ } if (this.appOptions.canPlugins) { this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions); - if (plugins.autoStartGuid) { - console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); - this.api.asc_pluginRun(plugins.autoStartGuid, 0, ''); - } else if (plugins.autostart && plugins.autostart.length>0) { + if (plugins.autostart && plugins.autostart.length>0) { // run array of plugins this.api.asc_pluginRun(plugins.autostart[0], 0, ''); } diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 7202a6606..a12c36884 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1859,12 +1859,17 @@ define([ } }); - if (arr.length>0) + if (arr.length>0) { + var autostart = plugins.autostart || plugins.autoStartGuid; + if (typeof (autostart) == 'string') + autostart = [autostart]; + plugins.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); + this.updatePluginsList({ - autoStartGuid: plugins.autoStartGuid, - autostart: plugins.autostart, + autostart: autostart, pluginsData: arr }, !!uiCustomize); + } }, updatePluginsList: function(plugins, uiCustomize) { @@ -1928,10 +1933,7 @@ define([ } if (this.appOptions.canPlugins) { this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions); - if (plugins.autoStartGuid) { - console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); - this.api.asc_pluginRun(plugins.autoStartGuid, 0, ''); - } else if (plugins.autostart && plugins.autostart.length>0) { + if (plugins.autostart && plugins.autostart.length>0) { // run array of plugins this.api.asc_pluginRun(plugins.autostart[0], 0, ''); }