Remove sensitivity settings

This commit is contained in:
Aleksander Machniak 2022-09-14 12:45:30 +02:00
parent 869bde56a8
commit b0f306eaf1
19 changed files with 17 additions and 149 deletions

View file

@ -286,7 +286,7 @@ class calendar extends rcube_plugin
/** /**
* Get properties of the calendar this user has specified as default * Get properties of the calendar this user has specified as default
*/ */
public function get_default_calendar($sensitivity = null, $calendars = null) public function get_default_calendar($calendars = null)
{ {
if ($calendars === null) { if ($calendars === null) {
$filter = calendar_driver::FILTER_PERSONAL | calendar_driver::FILTER_WRITEABLE; $filter = calendar_driver::FILTER_PERSONAL | calendar_driver::FILTER_WRITEABLE;
@ -297,12 +297,8 @@ class calendar extends rcube_plugin
$calendar = !empty($calendars[$default_id]) ? $calendars[$default_id] : null; $calendar = !empty($calendars[$default_id]) ? $calendars[$default_id] : null;
$first = null; $first = null;
if (!$calendar || $sensitivity) { if (!$calendar) {
foreach ($calendars as $cal) { foreach ($calendars as $cal) {
if ($sensitivity && !empty($cal['subtype']) && $cal['subtype'] == $sensitivity) {
$calendar = $cal;
break;
}
if (!empty($cal['default']) && $cal['editable']) { if (!empty($cal['default']) && $cal['editable']) {
$calendar = $cal; $calendar = $cal;
} }
@ -2961,7 +2957,7 @@ $("#rcmfd_new_category").keypress(function(event) {
} }
if (!empty($calendar_select)) { if (!empty($calendar_select)) {
$default_calendar = $this->get_default_calendar($data['sensitivity'], $calendars); $default_calendar = $this->get_default_calendar($calendars);
$response['select'] = html::span('folder-select', $this->gettext('saveincalendar') $response['select'] = html::span('folder-select', $this->gettext('saveincalendar')
. ' ' . ' '
. $calendar_select->show($is_shared ? $existing['calendar'] : $default_calendar['id']) . $calendar_select->show($is_shared ? $existing['calendar'] : $default_calendar['id'])
@ -3095,7 +3091,7 @@ $("#rcmfd_new_category").keypress(function(event) {
$existing = $this->driver->get_event($this->event); $existing = $this->driver->get_event($this->event);
// save the event to his/her default calendar if not yet present // save the event to his/her default calendar if not yet present
if (!$existing && ($calendar = $this->get_default_calendar($invitation['event']['sensitivity']))) { if (!$existing && ($calendar = $this->get_default_calendar())) {
$invitation['event']['calendar'] = $calendar['id']; $invitation['event']['calendar'] = $calendar['id'];
if ($this->driver->new_event($invitation['event'])) { if ($this->driver->new_event($invitation['event'])) {
$msg = $this->gettext(['name' => 'importedsuccessfully', 'vars' => ['calendar' => $calendar['name']]]); $msg = $this->gettext(['name' => 'importedsuccessfully', 'vars' => ['calendar' => $calendar['name']]]);
@ -3373,7 +3369,7 @@ $("#rcmfd_new_category").keypress(function(event) {
// select default calendar except user explicitly selected 'none' // select default calendar except user explicitly selected 'none'
if (!$calendar && !$dontsave) { if (!$calendar && !$dontsave) {
$calendar = $this->get_default_calendar($event['sensitivity'], $calendars); $calendar = $this->get_default_calendar($calendars);
} }
$metadata = [ $metadata = [
@ -3742,7 +3738,7 @@ $("#rcmfd_new_category").keypress(function(event) {
foreach ($events as $event) { foreach ($events as $event) {
// save to calendar // save to calendar
$calendar = !empty($calendars[$cal_id]) ? $calendars[$cal_id] : $this->get_default_calendar($event['sensitivity']); $calendar = !empty($calendars[$cal_id]) ? $calendars[$cal_id] : $this->get_default_calendar();
if ($calendar && $calendar['editable'] && $event['_type'] == 'event') { if ($calendar && $calendar['editable'] && $event['_type'] == 'event') {
$event['calendar'] = $calendar['id']; $event['calendar'] = $calendar['id'];

View file

@ -68,7 +68,6 @@ function rcube_calendar_ui(settings)
var count_sources = []; var count_sources = [];
var event_sources = []; var event_sources = [];
var exec_deferred = 1; var exec_deferred = 1;
var sensitivitylabels = { 'public':rcmail.gettext('public','calendar'), 'private':rcmail.gettext('private','calendar'), 'confidential':rcmail.gettext('confidential','calendar') };
var ui_loading = rcmail.set_busy(true, 'loading'); var ui_loading = rcmail.set_busy(true, 'loading');
// global fullcalendar settings // global fullcalendar settings
@ -138,8 +137,7 @@ function rcube_calendar_ui(settings)
// event rendering // event rendering
eventRender: function(event, element, view) { eventRender: function(event, element, view) {
if (view.name != 'list') { if (view.name != 'list') {
var prefix = event.sensitivity && event.sensitivity != 'public' ? String(sensitivitylabels[event.sensitivity]).toUpperCase()+': ' : ''; element.attr('title', event.title);
element.attr('title', prefix + event.title);
} }
if (view.name != 'month') { if (view.name != 'month') {
if (view.name == 'list') { if (view.name == 'list') {
@ -152,8 +150,6 @@ function rcube_calendar_ui(settings)
element.find('div.fc-title').after($('<div class="fc-event-location">').html('@&nbsp;' + Q(event.location))); element.find('div.fc-title').after($('<div class="fc-event-location">').html('@&nbsp;' + Q(event.location)));
} }
var time_element = element.find('div.fc-time'); var time_element = element.find('div.fc-time');
if (event.sensitivity && event.sensitivity != 'public')
time_element.append('<i class="fc-icon-sensitive"></i>');
if (event.recurrence) if (event.recurrence)
time_element.append('<i class="fc-icon-recurring"></i>'); time_element.append('<i class="fc-icon-recurring"></i>');
if (event.alarms || (event.valarms && event.valarms.length)) if (event.alarms || (event.valarms && event.valarms.length))
@ -369,10 +365,10 @@ function rcube_calendar_ui(settings)
if ($dialog.is(':ui-dialog')) if ($dialog.is(':ui-dialog'))
$dialog.dialog('close'); $dialog.dialog('close');
// remove status-* and sensitivity-* classes // remove status-* classes
$dialog.removeClass(function(i, oldclass) { $dialog.removeClass(function(i, oldclass) {
var oldies = String(oldclass).split(' '); var oldies = String(oldclass).split(' ');
return $.grep(oldies, function(cls) { return cls.indexOf('status-') === 0 || cls.indexOf('sensitivity-') === 0 }).join(' '); return $.grep(oldies, function(cls) { return cls.indexOf('status-') === 0; }).join(' ');
}); });
// convert start/end dates if not done yet by fullcalendar // convert start/end dates if not done yet by fullcalendar
@ -414,11 +410,6 @@ function rcube_calendar_ui(settings)
$('#event-status-badge > span').text(rcmail.gettext('status-'+status_lc,'calendar')); $('#event-status-badge > span').text(rcmail.gettext('status-'+status_lc,'calendar'));
$dialog.addClass('status-'+status_lc); $dialog.addClass('status-'+status_lc);
} }
if (event.sensitivity && event.sensitivity != 'public') {
$('#event-sensitivity').show().find('.event-text').text(sensitivitylabels[event.sensitivity]);
$('#event-status-badge > span').text(sensitivitylabels[event.sensitivity]);
$dialog.addClass('sensitivity-'+event.sensitivity);
}
if (event.created || event.changed) { if (event.created || event.changed) {
var created = parseISO8601(event.created), var created = parseISO8601(event.created),
changed = parseISO8601(event.changed); changed = parseISO8601(event.changed);
@ -670,7 +661,6 @@ function rcube_calendar_ui(settings)
var eventstatus = $('#edit-event-status').val(event.status); var eventstatus = $('#edit-event-status').val(event.status);
var freebusy = $('#edit-free-busy').val(event.free_busy); var freebusy = $('#edit-free-busy').val(event.free_busy);
var priority = $('#edit-priority').val(event.priority); var priority = $('#edit-priority').val(event.priority);
var sensitivity = $('#edit-sensitivity').val(event.sensitivity);
var syncstart = $('#edit-recurrence-syncstart input'); var syncstart = $('#edit-recurrence-syncstart input');
var end = 'toDate' in event.end ? event.end : moment(event.end); var end = 'toDate' in event.end ? event.end : moment(event.end);
var start = 'toDate' in event.start ? event.start : moment(event.start); var start = 'toDate' in event.start ? event.start : moment(event.start);
@ -851,7 +841,6 @@ function rcube_calendar_ui(settings)
vurl: vurl.val(), vurl: vurl.val(),
free_busy: freebusy.val(), free_busy: freebusy.val(),
priority: priority.val(), priority: priority.val(),
sensitivity: sensitivity.val(),
status: eventstatus.val(), status: eventstatus.val(),
recurrence: me.serialize_recurrence(endtime.val()), recurrence: me.serialize_recurrence(endtime.val()),
valarms: me.serialize_alarms('#edit-alarms'), valarms: me.serialize_alarms('#edit-alarms'),

View file

@ -657,8 +657,8 @@ class database_driver extends calendar_driver
// compose vcalendar-style recurrencue rule from structured data // compose vcalendar-style recurrencue rule from structured data
$rrule = !empty($event['recurrence']) ? libcalendaring::to_rrule($event['recurrence']) : ''; $rrule = !empty($event['recurrence']) ? libcalendaring::to_rrule($event['recurrence']) : '';
$sensitivity = strtolower($event['sensitivity']); $sensitivity = isset($event['sensitivity']) ? strtolower($event['sensitivity']) : '';
$free_busy = strtolower($event['free_busy']); $free_busy = isset($event['free_busy']) ? strtolower($event['free_busy']) : '';
$event['_recurrence'] = rtrim($rrule, ';'); $event['_recurrence'] = rtrim($rrule, ';');
$event['free_busy'] = isset($this->free_busy_map[$free_busy]) ? $this->free_busy_map[$free_busy] : null; $event['free_busy'] = isset($this->free_busy_map[$free_busy]) ? $this->free_busy_map[$free_busy] : null;

View file

@ -2304,7 +2304,6 @@ class kolab_driver extends calendar_driver
'attach' => 'attachments', 'attach' => 'attachments',
'rrule' => 'recurrence', 'rrule' => 'recurrence',
'transparency' => 'free_busy', 'transparency' => 'free_busy',
'classification' => 'sensitivity',
'lastmodified-date' => 'changed', 'lastmodified-date' => 'changed',
]; ];

View file

@ -83,7 +83,6 @@ class calendar_ui
$this->cal->register_handler('plugin.status_select', [$this, 'status_select']); $this->cal->register_handler('plugin.status_select', [$this, 'status_select']);
$this->cal->register_handler('plugin.freebusy_select', [$this, 'freebusy_select']); $this->cal->register_handler('plugin.freebusy_select', [$this, 'freebusy_select']);
$this->cal->register_handler('plugin.priority_select', [$this, 'priority_select']); $this->cal->register_handler('plugin.priority_select', [$this, 'priority_select']);
$this->cal->register_handler('plugin.sensitivity_select', [$this, 'sensitivity_select']);
$this->cal->register_handler('plugin.alarm_select', [$this, 'alarm_select']); $this->cal->register_handler('plugin.alarm_select', [$this, 'alarm_select']);
$this->cal->register_handler('plugin.recurrence_form', [$this->cal->lib, 'recurrence_form']); $this->cal->register_handler('plugin.recurrence_form', [$this->cal->lib, 'recurrence_form']);
$this->cal->register_handler('plugin.attendees_list', [$this, 'attendees_list']); $this->cal->register_handler('plugin.attendees_list', [$this, 'attendees_list']);
@ -534,21 +533,6 @@ class calendar_ui
return $select->show(null); return $select->show(null);
} }
/**
* Render HTML input for sensitivity selection
*/
function sensitivity_select($attrib = [])
{
$attrib['name'] = 'sensitivity';
$select = new html_select($attrib);
$select->add($this->cal->gettext('public'), 'public');
$select->add($this->cal->gettext('private'), 'private');
$select->add($this->cal->gettext('confidential'), 'confidential');
return $select->show(null);
}
/** /**
* Render HTML form for alarm configuration * Render HTML form for alarm configuration
*/ */

View file

@ -365,11 +365,6 @@
<span class="event-text-old"></span> &#8674; <span class="event-text-old"></span> &#8674;
<span class="event-text-new"></span> <span class="event-text-new"></span>
</div> </div>
<div class="event-line event-sensitivity">
<label><roundcube:label name="calendar.sensitivity" /></label>
<span class="event-text-old"></span> &#8674;
<span class="event-text-new"></span>
</div>
<div class="form-group row event-attachments"> <div class="form-group row event-attachments">
<label><roundcube:label name="attachments" /><span class="index"></span></label> <label><roundcube:label name="attachments" /><span class="index"></span></label>
<div class="event-text-old"></div> <div class="event-text-old"></div>

View file

@ -75,12 +75,6 @@
<roundcube:object name="plugin.priority_select" id="edit-priority" class="form-control" /> <roundcube:object name="plugin.priority_select" id="edit-priority" class="form-control" />
</div> </div>
</div> </div>
<div class="form-group row">
<label for="edit-sensitivity" class="col-sm-2 col-form-label"><roundcube:label name="calendar.sensitivity" /></label>
<div class="col-sm-10">
<roundcube:object name="plugin.sensitivity_select" id="edit-sensitivity" class="form-control" />
</div>
</div>
<div class="form-group row"> <div class="form-group row">
<label for="edit-url" class="col-sm-2 col-form-label"><roundcube:label name="calendar.url" /></label> <label for="edit-url" class="col-sm-2 col-form-label"><roundcube:label name="calendar.url" /></label>
<div class="col-sm-10"> <div class="col-sm-10">

View file

@ -134,12 +134,6 @@
<label><roundcube:label name="calendar.priority" /></label> <label><roundcube:label name="calendar.priority" /></label>
<span class="event-text"></span> <span class="event-text"></span>
</div> </div>
<!--
<div class="event-line" id="event-sensitivity">
<label><roundcube:label name="calendar.sensitivity" /></label>
<span class="event-text"></span>
</div>
-->
<div class="event-line" id="event-created-changed"> <div class="event-line" id="event-created-changed">
<label><roundcube:label name="calendar.created" /></label> <label><roundcube:label name="calendar.created" /></label>
<span class="event-text event-created"></span> <span class="event-text event-created"></span>
@ -243,11 +237,6 @@
<span class="event-text-old"></span> &#8674; <span class="event-text-old"></span> &#8674;
<span class="event-text-new"></span> <span class="event-text-new"></span>
</div> </div>
<div class="event-line event-sensitivity">
<label><roundcube:label name="calendar.sensitivity" /></label>
<span class="event-text-old"></span> &#8674;
<span class="event-text-new"></span>
</div>
<div class="event-section event-attachments"> <div class="event-section event-attachments">
<label><roundcube:label name="attachments" /><span class="index"></span></label> <label><roundcube:label name="attachments" /><span class="index"></span></label>
<div class="event-text-old"></div> <div class="event-text-old"></div>

View file

@ -66,10 +66,6 @@
<label for="edit-priority"><roundcube:label name="calendar.priority" /></label> <label for="edit-priority"><roundcube:label name="calendar.priority" /></label>
<roundcube:object name="plugin.priority_select" id="edit-priority" /> <roundcube:object name="plugin.priority_select" id="edit-priority" />
</div> </div>
<div class="event-section">
<label for="edit-sensitivity"><roundcube:label name="calendar.sensitivity" /></label>
<roundcube:object name="plugin.sensitivity_select" id="edit-sensitivity" />
</div>
<div class="event-section" id="edit-event-links"> <div class="event-section" id="edit-event-links">
<label><roundcube:label name="calendar.links" /></label> <label><roundcube:label name="calendar.links" /></label>
<div class="event-text"></div> <div class="event-text"></div>

View file

@ -28,8 +28,8 @@ class kolab_folders extends rcube_plugin
public $types = array('mail', 'event', 'journal', 'task', 'note', 'contact', 'configuration', 'file', 'freebusy'); public $types = array('mail', 'event', 'journal', 'task', 'note', 'contact', 'configuration', 'file', 'freebusy');
public $subtypes = array( public $subtypes = array(
'mail' => array('inbox', 'drafts', 'sentitems', 'outbox', 'wastebasket', 'junkemail'), 'mail' => array('inbox', 'drafts', 'sentitems', 'outbox', 'wastebasket', 'junkemail'),
'event' => array('default', 'confidential', 'private'), 'event' => array('default'),
'task' => array('default', 'confidential', 'private'), 'task' => array('default'),
'journal' => array('default'), 'journal' => array('default'),
'note' => array('default'), 'note' => array('default'),
'contact' => array('default'), 'contact' => array('default'),

View file

@ -680,7 +680,6 @@ class libcalendaring_itip
$emails = $this->lib->get_user_emails(); $emails = $this->lib->get_user_emails();
$title = $event['sequence'] > 0 ? $this->gettext('itipupdate') : $this->gettext('itipinvitation'); $title = $event['sequence'] > 0 ? $this->gettext('itipupdate') : $this->gettext('itipinvitation');
$metadata['rsvp'] = true; $metadata['rsvp'] = true;
$metadata['sensitivity'] = $event['sensitivity'];
if (is_object($event['start'])) { if (is_object($event['start'])) {
$metadata['date'] = $event['start']->format('U'); $metadata['date'] = $event['start']->format('U');
@ -927,10 +926,6 @@ class libcalendaring_itip
$table->add('label', $this->gettext('location')); $table->add('label', $this->gettext('location'));
$table->add('location', rcube::Q($location)); $table->add('location', rcube::Q($location));
} }
if (($sensitivity = trim($event['sensitivity'])) && !preg_match('/^(x-|public$)/i', $sensitivity)) {
$table->add('label', $this->gettext('sensitivity'));
$table->add('sensitivity', ucfirst($this->gettext($sensitivity)) . '!');
}
if (!empty($event['status']) && ($event['status'] == 'COMPLETED' || $event['status'] == 'CANCELLED')) { if (!empty($event['status']) && ($event['status'] == 'COMPLETED' || $event['status'] == 'CANCELLED')) {
$table->add('label', $this->gettext('status')); $table->add('label', $this->gettext('status'));
$table->add('status', $this->gettext('status-' . strtolower($event['status']))); $table->add('status', $this->gettext('status-' . strtolower($event['status'])));

View file

@ -541,11 +541,6 @@ class libvcalendar implements Iterator
} }
break; break;
case 'CLASS':
case 'X-CALENDARSERVER-ACCESS':
$event['sensitivity'] = strtolower($value);
break;
case 'X-MICROSOFT-CDO-BUSYSTATUS': case 'X-MICROSOFT-CDO-BUSYSTATUS':
if ($value == 'OOF') { if ($value == 'OOF') {
$event['free_busy'] = 'outofoffice'; $event['free_busy'] = 'outofoffice';
@ -1174,9 +1169,6 @@ class libvcalendar implements Iterator
$ve->add('STATUS', $event['status']); $ve->add('STATUS', $event['status']);
} }
if (!empty($event['sensitivity']))
$ve->add('CLASS', strtoupper($event['sensitivity']));
if (!empty($event['complete'])) { if (!empty($event['complete'])) {
$ve->add('PERCENT-COMPLETE', intval($event['complete'])); $ve->add('PERCENT-COMPLETE', intval($event['complete']));
} }

View file

@ -165,7 +165,6 @@ class libvcalendar_test extends PHPUnit\Framework\TestCase
// categories, class // categories, class
$this->assertEquals('libcalendaring tests', join(',', (array)$event['categories']), "Event categories"); $this->assertEquals('libcalendaring tests', join(',', (array)$event['categories']), "Event categories");
$this->assertEquals('confidential', $event['sensitivity'], "Class/sensitivity = confidential");
// parse a recurrence chain instance // parse a recurrence chain instance
$events = $ical->import_from_file(__DIR__ . '/resources/recurrence-id.ics', 'UTF-8'); $events = $ical->import_from_file(__DIR__ . '/resources/recurrence-id.ics', 'UTF-8');
@ -389,7 +388,6 @@ class libvcalendar_test extends PHPUnit\Framework\TestCase
$this->assertSame(2, substr_count($ics, 'DTSTAMP'), "Duplicate DTSTAMP (T1148)"); $this->assertSame(2, substr_count($ics, 'DTSTAMP'), "Duplicate DTSTAMP (T1148)");
$this->assertContains('UID:ac6b0aee-2519-4e5c-9a25-48c57064c9f0', $ics, "Event UID"); $this->assertContains('UID:ac6b0aee-2519-4e5c-9a25-48c57064c9f0', $ics, "Event UID");
$this->assertContains('SEQUENCE:' . $event['sequence'], $ics, "Export Sequence number"); $this->assertContains('SEQUENCE:' . $event['sequence'], $ics, "Export Sequence number");
$this->assertContains('CLASS:CONFIDENTIAL', $ics, "Sensitivity => Class");
$this->assertContains('DESCRIPTION:*Exported by', $ics, "Export Description"); $this->assertContains('DESCRIPTION:*Exported by', $ics, "Export Description");
$this->assertContains('ORGANIZER;CN=Rolf Test:mailto:rolf@', $ics, "Export organizer"); $this->assertContains('ORGANIZER;CN=Rolf Test:mailto:rolf@', $ics, "Export organizer");
$this->assertRegExp('/ATTENDEE.*;ROLE=REQ-PARTICIPANT/', $ics, "Export Attendee ROLE"); $this->assertRegExp('/ATTENDEE.*;ROLE=REQ-PARTICIPANT/', $ics, "Export Attendee ROLE");

View file

@ -31,12 +31,6 @@ class kolab_format_file extends kolab_format
protected $read_func = 'kolabformat::readKolabFile'; protected $read_func = 'kolabformat::readKolabFile';
protected $write_func = 'kolabformat::writeKolabFile'; protected $write_func = 'kolabformat::writeKolabFile';
protected $sensitivity_map = array(
'public' => kolabformat::ClassPublic,
'private' => kolabformat::ClassPrivate,
'confidential' => kolabformat::ClassConfidential,
);
/** /**
* Set properties to the kolabformat object * Set properties to the kolabformat object
* *
@ -47,7 +41,6 @@ class kolab_format_file extends kolab_format
// set common object properties // set common object properties
parent::set($object); parent::set($object);
$this->obj->setClassification($this->sensitivity_map[$object['sensitivity']]);
$this->obj->setCategories(self::array2vector($object['categories'])); $this->obj->setCategories(self::array2vector($object['categories']));
if (isset($object['notes'])) { if (isset($object['notes'])) {
@ -115,11 +108,8 @@ class kolab_format_file extends kolab_format
// read common object props into local data object // read common object props into local data object
$object = parent::to_array($data); $object = parent::to_array($data);
$sensitivity_map = array_flip($this->sensitivity_map);
// read object properties // read object properties
$object += array( $object += array(
'sensitivity' => $sensitivity_map[$this->obj->classification()],
'categories' => self::vector2array($this->obj->categories()), 'categories' => self::vector2array($this->obj->categories()),
'notes' => $this->obj->note(), 'notes' => $this->obj->note(),
); );

View file

@ -33,12 +33,6 @@ class kolab_format_note extends kolab_format
protected $read_func = 'readNote'; protected $read_func = 'readNote';
protected $write_func = 'writeNote'; protected $write_func = 'writeNote';
protected $sensitivity_map = array(
'public' => kolabformat::ClassPublic,
'private' => kolabformat::ClassPrivate,
'confidential' => kolabformat::ClassConfidential,
);
/** /**
* Set properties to the kolabformat object * Set properties to the kolabformat object
* *
@ -51,7 +45,6 @@ class kolab_format_note extends kolab_format
$this->obj->setSummary($object['title']); $this->obj->setSummary($object['title']);
$this->obj->setDescription($object['description']); $this->obj->setDescription($object['description']);
$this->obj->setClassification($this->sensitivity_map[$object['sensitivity']]);
$this->obj->setCategories(self::array2vector($object['categories'])); $this->obj->setCategories(self::array2vector($object['categories']));
$this->set_attachments($object); $this->set_attachments($object);
@ -85,11 +78,8 @@ class kolab_format_note extends kolab_format
// read common object props into local data object // read common object props into local data object
$object = parent::to_array($data); $object = parent::to_array($data);
$sensitivity_map = array_flip($this->sensitivity_map);
// read object properties // read object properties
$object += array( $object += array(
'sensitivity' => $sensitivity_map[$this->obj->classification()],
'categories' => self::vector2array($this->obj->categories()), 'categories' => self::vector2array($this->obj->categories()),
'title' => $this->obj->summary(), 'title' => $this->obj->summary(),
'description' => $this->obj->description(), 'description' => $this->obj->description(),

View file

@ -34,12 +34,6 @@ abstract class kolab_format_xcal extends kolab_format
protected $_scheduling_properties = null; protected $_scheduling_properties = null;
protected $sensitivity_map = array(
'public' => kolabformat::ClassPublic,
'private' => kolabformat::ClassPrivate,
'confidential' => kolabformat::ClassConfidential,
);
protected $role_map = array( protected $role_map = array(
'REQ-PARTICIPANT' => kolabformat::Required, 'REQ-PARTICIPANT' => kolabformat::Required,
'OPT-PARTICIPANT' => kolabformat::Optional, 'OPT-PARTICIPANT' => kolabformat::Optional,
@ -116,7 +110,6 @@ abstract class kolab_format_xcal extends kolab_format
$object = parent::to_array($data); $object = parent::to_array($data);
$status_map = array_flip($this->status_map); $status_map = array_flip($this->status_map);
$sensitivity_map = array_flip($this->sensitivity_map);
$object += array( $object += array(
'sequence' => intval($this->obj->sequence()), 'sequence' => intval($this->obj->sequence()),
@ -125,7 +118,6 @@ abstract class kolab_format_xcal extends kolab_format
'description' => $this->obj->description(), 'description' => $this->obj->description(),
'url' => $this->obj->url(), 'url' => $this->obj->url(),
'status' => $status_map[$this->obj->status()], 'status' => $status_map[$this->obj->status()],
'sensitivity' => $sensitivity_map[$this->obj->classification()],
'priority' => $this->obj->priority(), 'priority' => $this->obj->priority(),
'categories' => self::vector2array($this->obj->categories()), 'categories' => self::vector2array($this->obj->categories()),
'start' => self::php_datetime($this->obj->start()), 'start' => self::php_datetime($this->obj->start()),
@ -356,7 +348,6 @@ abstract class kolab_format_xcal extends kolab_format
$this->obj->setLocation($object['location']); $this->obj->setLocation($object['location']);
$this->obj->setDescription($object['description']); $this->obj->setDescription($object['description']);
$this->obj->setPriority($object['priority']); $this->obj->setPriority($object['priority']);
$this->obj->setClassification($this->sensitivity_map[$object['sensitivity']]);
$this->obj->setCategories(self::array2vector($object['categories'])); $this->obj->setCategories(self::array2vector($object['categories']));
$this->obj->setUrl(strval($object['url'])); $this->obj->setUrl(strval($object['url']));

View file

@ -394,10 +394,6 @@ fieldset.categories .input-group {
&.fc-icon-alarms:before { &.fc-icon-alarms:before {
content: @fa-var-bell; content: @fa-var-bell;
} }
&.fc-icon-sensitive:before {
content: @fa-var-lock;
}
} }
.fc-event-temp { .fc-event-temp {

View file

@ -46,10 +46,6 @@
padding-right: 1em; padding-right: 1em;
} }
&.sensitivity {
font-weight: bold;
}
&.recurrence-id { &.recurrence-id {
text-transform: uppercase; text-transform: uppercase;
font-style: italic; font-style: italic;
@ -570,24 +566,6 @@
content: @fa-var-times-circle; content: @fa-var-times-circle;
} }
} }
.sensitivity-private & {
background-color: darken(@color-warning, 10%);
display: block;
&:before {
content: @fa-var-lock;
}
}
.sensitivity-confidential & {
background-color: darken(@color-error, 10%);
display: block;
&:before {
content: @fa-var-user-secret;
}
}
} }
} }

View file

@ -1972,7 +1972,7 @@ class tasklist extends rcube_plugin
/** /**
* Get properties of the tasklist this user has specified as default * Get properties of the tasklist this user has specified as default
*/ */
public function get_default_tasklist($sensitivity = null, $lists = null) public function get_default_tasklist($lists = null)
{ {
if ($lists === null) { if ($lists === null) {
$lists = $this->driver->get_lists(tasklist_driver::FILTER_PERSONAL | tasklist_driver::FILTER_WRITEABLE); $lists = $this->driver->get_lists(tasklist_driver::FILTER_PERSONAL | tasklist_driver::FILTER_WRITEABLE);
@ -1981,10 +1981,6 @@ class tasklist extends rcube_plugin
$list = null; $list = null;
foreach ($lists as $l) { foreach ($lists as $l) {
if ($sensitivity && $l['subtype'] == $sensitivity) {
$list = $l;
break;
}
if ($l['default']) { if ($l['default']) {
$list = $l; $list = $l;
} }
@ -2033,7 +2029,7 @@ class tasklist extends rcube_plugin
foreach ($tasks as $task) { foreach ($tasks as $task) {
// save to tasklist // save to tasklist
$list = $lists[$cal_id] ?: $this->get_default_tasklist($task['sensitivity']); $list = $lists[$cal_id] ?: $this->get_default_tasklist();
if ($list && $list['editable'] && $task['_type'] == 'task') { if ($list && $list['editable'] && $task['_type'] == 'task') {
$task = $this->from_ical($task); $task = $this->from_ical($task);
$task['list'] = $list['id']; $task['list'] = $list['id'];
@ -2121,7 +2117,7 @@ class tasklist extends rcube_plugin
// select default list except user explicitly selected 'none' // select default list except user explicitly selected 'none'
if (!$list && !$dontsave) { if (!$list && !$dontsave) {
$list = $this->get_default_tasklist($task['sensitivity'], $lists); $list = $this->get_default_tasklist($lists);
} }
$metadata = array( $metadata = array(
@ -2382,7 +2378,7 @@ class tasklist extends rcube_plugin
} }
if ($select) { if ($select) {
$default_list = $this->get_default_tasklist($data['sensitivity'], $lists); $default_list = $this->get_default_tasklist($lists);
$response['select'] = html::span('folder-select', $this->gettext('saveintasklist') . '&nbsp;' . $response['select'] = html::span('folder-select', $this->gettext('saveintasklist') . '&nbsp;' .
$select->show($is_shared ? $existing['list'] : $default_list['id'])); $select->show($is_shared ? $existing['list'] : $default_list['id']));
} }