forked from extern/egroupware
Disable videoconference features in Calendar when it's set to disabled
This commit is contained in:
parent
dabf3ac3a4
commit
33a3c4035b
@ -248,7 +248,8 @@ class calendar_boupdate extends calendar_bo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// generate a video-room-url, if we need one and not already have one
|
// generate a video-room-url, if we need one and not already have one
|
||||||
if ($event['videoconference'] && empty($event['##videoconference']) && class_exists('EGroupware\\Status\\Videoconference\\Call'))
|
if ($event['videoconference'] && empty($event['##videoconference']) && class_exists('EGroupware\\Status\\Videoconference\\Call')
|
||||||
|
&& !EGroupware\Status\Hooks::isVideoconferenceDisabled())
|
||||||
{
|
{
|
||||||
$event['##videoconference'] = EGroupware\Status\Videoconference\Call::genUniqueRoomID();
|
$event['##videoconference'] = EGroupware\Status\Videoconference\Call::genUniqueRoomID();
|
||||||
}
|
}
|
||||||
@ -1066,7 +1067,8 @@ class calendar_boupdate extends calendar_bo
|
|||||||
$details['olddate'] = $olddate->format($timeformat);
|
$details['olddate'] = $olddate->format($timeformat);
|
||||||
}
|
}
|
||||||
// generate a personal videoconference url, if we need one
|
// generate a personal videoconference url, if we need one
|
||||||
if (!empty($event['##videoconference']) && class_exists('EGroupware\\Status\\Videoconference\\Call'))
|
if (!empty($event['##videoconference']) && class_exists('EGroupware\\Status\\Videoconference\\Call')
|
||||||
|
&& !EGroupware\Status\Hooks::isVideoconferenceDisabled())
|
||||||
{
|
{
|
||||||
$avatar = new Api\Contacts\Photo(is_numeric($userid) ? "account:$userid" :
|
$avatar = new Api\Contacts\Photo(is_numeric($userid) ? "account:$userid" :
|
||||||
(isset($res_info) && $res_info['type'] === 'c' ? $res_info['res_id'] : $userid),
|
(isset($res_info) && $res_info['type'] === 'c' ? $res_info['res_id'] : $userid),
|
||||||
|
@ -903,7 +903,8 @@ END:VALARM';
|
|||||||
// do not set actions for alarm type
|
// do not set actions for alarm type
|
||||||
if ($params['data']['type'] == 6)
|
if ($params['data']['type'] == 6)
|
||||||
{
|
{
|
||||||
if (!empty($params['data']['videoconference']))
|
if (!empty($params['data']['videoconference'])
|
||||||
|
&& $GLOBALS['egw_info']['user']['apps']['status'] && !EGroupware\Status\Hooks::isVideoconferenceDisabled())
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
array(
|
array(
|
||||||
|
@ -2023,6 +2023,12 @@ class calendar_uiforms extends calendar_ui
|
|||||||
|
|
||||||
if (!empty($preserved['lock_token'])) $content['lock_token'] = $preserved['lock_token'];
|
if (!empty($preserved['lock_token'])) $content['lock_token'] = $preserved['lock_token'];
|
||||||
|
|
||||||
|
//Disable videoconference if the module is not enabled
|
||||||
|
if ($GLOBALS['egw_info']['user']['apps']['status'] && EGroupware\Status\Hooks::isVideoconferenceDisabled())
|
||||||
|
{
|
||||||
|
$readonlys['videoconference'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
// non_interactive==true from $_GET calls immediate save action without displaying the edit form
|
// non_interactive==true from $_GET calls immediate save action without displaying the edit form
|
||||||
if(isset($_GET['non_interactive']) && (bool)$_GET['non_interactive'] === true)
|
if(isset($_GET['non_interactive']) && (bool)$_GET['non_interactive'] === true)
|
||||||
{
|
{
|
||||||
|
@ -989,6 +989,7 @@ class calendar_uilist extends calendar_ui
|
|||||||
'caption' => 'Join',
|
'caption' => 'Join',
|
||||||
'icon' => 'status/videoconference_join',
|
'icon' => 'status/videoconference_join',
|
||||||
'onExecute' => 'javaScript:app.calendar.joinVideoConferenceAction',
|
'onExecute' => 'javaScript:app.calendar.joinVideoConferenceAction',
|
||||||
|
'enabled' => !EGroupware\Status\Hooks::isVideoconferenceDisabled(),
|
||||||
'allowOnMultiple' => false,
|
'allowOnMultiple' => false,
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user