Skip to content

Commit 540590e

Browse files
committed
Group: Fix loading of videoconference plugins - refs #6649
1 parent 98324dc commit 540590e

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

public/main/group/group_space.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,13 @@ class="btn btn--plain" href="'.api_get_self().'?selfUnReg=1"
211211
}*/
212212
}
213213

214-
$enabled = api_get_plugin_setting('bbb', 'tool_enable');
215-
if ('true' === $enabled) {
214+
$pluginRepo = Container::getPluginRepository();
215+
$plugin = $pluginRepo->findOneByTitle('bbb');
216+
$pluginConfiguration = $plugin?->getConfigurationsByAccessUrl(Container::getAccessUrlUtil()->getCurrent());
217+
$isInstalled = $plugin && $plugin->isInstalled();
218+
$isEnabled = $plugin && $pluginConfiguration && $pluginConfiguration->isActive();
219+
220+
if ($isInstalled && $isEnabled) {
216221
$bbb = new Bbb();
217222
if ($bbb->hasGroupSupport()) {
218223
$actions_array[] = [
@@ -222,8 +227,12 @@ class="btn btn--plain" href="'.api_get_self().'?selfUnReg=1"
222227
}
223228
}
224229

225-
$enabled = api_get_plugin_setting('zoom', 'tool_enable');
226-
if ('true' === $enabled) {
230+
$plugin = $pluginRepo->findOneByTitle('zoom');
231+
$pluginConfiguration = $plugin?->getConfigurationsByAccessUrl(Container::getAccessUrlUtil()->getCurrent());
232+
$isInstalled = $plugin && $plugin->isInstalled();
233+
$isEnabled = $plugin && $pluginConfiguration && $pluginConfiguration->isActive();
234+
235+
if ($isInstalled && $isEnabled) {
227236
$actions_array[] = [
228237
'url' => api_get_path(WEB_PLUGIN_PATH).'zoom/start.php?'.api_get_cidreq(),
229238
'content' => Display::getMdiIcon(ToolIcon::VIDEOCONFERENCE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Videoconference')),

0 commit comments

Comments
 (0)