mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
remove config allowing to immediately delete events (as it's required for sync)
This commit is contained in:
parent
cc77e68341
commit
45c89a7930
@ -1906,7 +1906,7 @@ class calendar_boupdate extends calendar_bo
|
||||
if (!$recur_date || $event['recur_type'] == MCAL_RECUR_NONE)
|
||||
{
|
||||
$config = Api\Config::read('phpgwapi');
|
||||
if(!$config['calendar_delete_history'] || $event['deleted'])
|
||||
if ($event['deleted'])
|
||||
{
|
||||
$this->so->delete($cal_id);
|
||||
|
||||
|
@ -1621,7 +1621,7 @@ class calendar_groupdav extends Api\CalDAV\Handler
|
||||
);
|
||||
// rfc 6578 sync-collection report for everything but outbox
|
||||
// only if "delete-prevention" is switched on (deleted entries get marked deleted but not actualy deleted
|
||||
if (strpos($path, '/outbox/') === false && $GLOBALS['egw_info']['server']['calendar_delete_history'])
|
||||
if (strpos($path, '/outbox/') === false)
|
||||
{
|
||||
$props['supported-report-set']['sync-collection'] = Api\CalDAV::mkprop('supported-report',array(
|
||||
Api\CalDAV::mkprop('report',array(
|
||||
|
@ -583,10 +583,7 @@ class calendar_ui
|
||||
array('value' => 'no-enum-groups', 'label' => lang('only group-events'),'title' => lang('Do not include events of group members')),
|
||||
array('value' => 'not-unknown', 'label' => lang('No meeting requests'),'title' => lang('Show all status, but unknown')),
|
||||
);
|
||||
if($GLOBALS['egw_info']['server']['calendar_delete_history'])
|
||||
{
|
||||
$sel_options['status_filter'][] = array('value' => 'deleted', 'label' => lang('Deleted'), 'title' => lang('Show events that have been deleted'));
|
||||
}
|
||||
$sel_options['status_filter'][] = array('value' => 'deleted', 'label' => lang('Deleted'), 'title' => lang('Show events that have been deleted'));
|
||||
|
||||
// Merge print
|
||||
try {
|
||||
|
@ -1935,7 +1935,7 @@ class calendar_uiforms extends calendar_ui
|
||||
}
|
||||
|
||||
// Allow admins to restore deleted events
|
||||
if($GLOBALS['egw_info']['server']['calendar_delete_history'] && $event['deleted'] )
|
||||
if ($event['deleted'])
|
||||
{
|
||||
$content['deleted'] = $preserved['deleted'] = null;
|
||||
$etpl->set_cell_attribute('button[save]', 'label', 'Recover');
|
||||
|
@ -1123,18 +1123,15 @@ class calendar_uilist extends calendar_ui
|
||||
'confirm' => lang('Delete this entry')
|
||||
);
|
||||
// Add in deleted for admins
|
||||
if($GLOBALS['egw_info']['server']['calendar_delete_history'])
|
||||
{
|
||||
$actions['undelete'] = array(
|
||||
'caption' => 'Un-delete',
|
||||
'onExecute' => 'javaScript:app.calendar.cal_delete',
|
||||
'icon' => 'revert',
|
||||
'hint' => 'Recover this event',
|
||||
'group' => $group,
|
||||
'enableClass' => 'rowDeleted',
|
||||
'hideOnDisabled' => true,
|
||||
);
|
||||
}
|
||||
$actions['undelete'] = array(
|
||||
'caption' => 'Un-delete',
|
||||
'onExecute' => 'javaScript:app.calendar.cal_delete',
|
||||
'icon' => 'revert',
|
||||
'hint' => 'Recover this event',
|
||||
'group' => $group,
|
||||
'enableClass' => 'rowDeleted',
|
||||
'hideOnDisabled' => true,
|
||||
);
|
||||
|
||||
//_debug_array($actions);
|
||||
return $actions;
|
||||
|
@ -65,8 +65,7 @@
|
||||
<row>
|
||||
<description value="Prevent deleting of entries"/>
|
||||
<select id="newsettings[calendar_delete_history]">
|
||||
<option value="">No</option>
|
||||
<option value="history">Yes, only admins can purge deleted items</option>
|
||||
<option value="">Yes, only admins can purge deleted items</option>
|
||||
<option value="userpurge">Yes, users can purge their deleted items</option>
|
||||
</select>
|
||||
</row>
|
||||
|
Loading…
Reference in New Issue
Block a user