File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1414 * See the License for the specific language governing permissions and
1515 * limitations under the License.
1616 */
17+
18+ use Chamilo \CoreBundle \Framework \Container ;
19+
1720require_once __DIR__ .'/../../main/inc/global.inc.php ' ;
1821require_once __DIR__ .'/lib/onlyofficeSettingsFormBuilder.php ' ;
1922require_once __DIR__ .'/lib/onlyofficeAppSettings.php ' ;
2427$ plugin = OnlyofficePlugin::create ();
2528$ appSettings = new OnlyofficeAppsettings ($ plugin );
2629$ plugin_info = $ plugin ->get_info ();
27- $ plugin_info ['settings_form ' ] = OnlyofficeSettingsFormBuilder::buildSettingsForm ($ appSettings );
28- if ($ plugin_info ['settings_form ' ]->validate ()) {
29- $ plugin = OnlyofficeSettingsFormBuilder::validateSettingsForm ($ appSettings );
30+
31+ $ installed = Container::getPluginRepository ()->isInstalledByName ($ plugin ->get_name ());
32+
33+ if ($ installed ) {
34+ $ plugin_info ['settings_form ' ] = OnlyofficeSettingsFormBuilder::buildSettingsForm ($ appSettings );
35+ if ($ plugin_info ['settings_form ' ]->validate ()) {
36+ $ plugin = OnlyofficeSettingsFormBuilder::validateSettingsForm ($ appSettings );
37+ }
3038}
You can’t perform that action at this time.
0 commit comments