Remove sensitivity settings
This commit is contained in:
parent
869bde56a8
commit
b0f306eaf1
19 changed files with 17 additions and 149 deletions
|
@ -286,7 +286,7 @@ class calendar extends rcube_plugin
|
|||
/**
|
||||
* 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) {
|
||||
$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;
|
||||
$first = null;
|
||||
|
||||
if (!$calendar || $sensitivity) {
|
||||
if (!$calendar) {
|
||||
foreach ($calendars as $cal) {
|
||||
if ($sensitivity && !empty($cal['subtype']) && $cal['subtype'] == $sensitivity) {
|
||||
$calendar = $cal;
|
||||
break;
|
||||
}
|
||||
if (!empty($cal['default']) && $cal['editable']) {
|
||||
$calendar = $cal;
|
||||
}
|
||||
|
@ -2961,7 +2957,7 @@ $("#rcmfd_new_category").keypress(function(event) {
|
|||
}
|
||||
|
||||
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')
|
||||
. ' '
|
||||
. $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);
|
||||
|
||||
// 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'];
|
||||
if ($this->driver->new_event($invitation['event'])) {
|
||||
$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'
|
||||
if (!$calendar && !$dontsave) {
|
||||
$calendar = $this->get_default_calendar($event['sensitivity'], $calendars);
|
||||
$calendar = $this->get_default_calendar($calendars);
|
||||
}
|
||||
|
||||
$metadata = [
|
||||
|
@ -3742,7 +3738,7 @@ $("#rcmfd_new_category").keypress(function(event) {
|
|||
|
||||
foreach ($events as $event) {
|
||||
// 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') {
|
||||
$event['calendar'] = $calendar['id'];
|
||||
|
||||
|
|
|
@ -68,7 +68,6 @@ function rcube_calendar_ui(settings)
|
|||
var count_sources = [];
|
||||
var event_sources = [];
|
||||
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');
|
||||
|
||||
// global fullcalendar settings
|
||||
|
@ -138,8 +137,7 @@ function rcube_calendar_ui(settings)
|
|||
// event rendering
|
||||
eventRender: function(event, element, view) {
|
||||
if (view.name != 'list') {
|
||||
var prefix = event.sensitivity && event.sensitivity != 'public' ? String(sensitivitylabels[event.sensitivity]).toUpperCase()+': ' : '';
|
||||
element.attr('title', prefix + event.title);
|
||||
element.attr('title', event.title);
|
||||
}
|
||||
if (view.name != 'month') {
|
||||
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('@ ' + Q(event.location)));
|
||||
}
|
||||
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)
|
||||
time_element.append('<i class="fc-icon-recurring"></i>');
|
||||
if (event.alarms || (event.valarms && event.valarms.length))
|
||||
|
@ -369,10 +365,10 @@ function rcube_calendar_ui(settings)
|
|||
if ($dialog.is(':ui-dialog'))
|
||||
$dialog.dialog('close');
|
||||
|
||||
// remove status-* and sensitivity-* classes
|
||||
// remove status-* classes
|
||||
$dialog.removeClass(function(i, oldclass) {
|
||||
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
|
||||
|
@ -414,11 +410,6 @@ function rcube_calendar_ui(settings)
|
|||
$('#event-status-badge > span').text(rcmail.gettext('status-'+status_lc,'calendar'));
|
||||
$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) {
|
||||
var created = parseISO8601(event.created),
|
||||
changed = parseISO8601(event.changed);
|
||||
|
@ -670,7 +661,6 @@ function rcube_calendar_ui(settings)
|
|||
var eventstatus = $('#edit-event-status').val(event.status);
|
||||
var freebusy = $('#edit-free-busy').val(event.free_busy);
|
||||
var priority = $('#edit-priority').val(event.priority);
|
||||
var sensitivity = $('#edit-sensitivity').val(event.sensitivity);
|
||||
var syncstart = $('#edit-recurrence-syncstart input');
|
||||
var end = 'toDate' in event.end ? event.end : moment(event.end);
|
||||
var start = 'toDate' in event.start ? event.start : moment(event.start);
|
||||
|
@ -851,7 +841,6 @@ function rcube_calendar_ui(settings)
|
|||
vurl: vurl.val(),
|
||||
free_busy: freebusy.val(),
|
||||
priority: priority.val(),
|
||||
sensitivity: sensitivity.val(),
|
||||
status: eventstatus.val(),
|
||||
recurrence: me.serialize_recurrence(endtime.val()),
|
||||
valarms: me.serialize_alarms('#edit-alarms'),
|
||||
|
|
|
@ -657,8 +657,8 @@ class database_driver extends calendar_driver
|
|||
// compose vcalendar-style recurrencue rule from structured data
|
||||
$rrule = !empty($event['recurrence']) ? libcalendaring::to_rrule($event['recurrence']) : '';
|
||||
|
||||
$sensitivity = strtolower($event['sensitivity']);
|
||||
$free_busy = strtolower($event['free_busy']);
|
||||
$sensitivity = isset($event['sensitivity']) ? strtolower($event['sensitivity']) : '';
|
||||
$free_busy = isset($event['free_busy']) ? strtolower($event['free_busy']) : '';
|
||||
|
||||
$event['_recurrence'] = rtrim($rrule, ';');
|
||||
$event['free_busy'] = isset($this->free_busy_map[$free_busy]) ? $this->free_busy_map[$free_busy] : null;
|
||||
|
|
|
@ -2304,7 +2304,6 @@ class kolab_driver extends calendar_driver
|
|||
'attach' => 'attachments',
|
||||
'rrule' => 'recurrence',
|
||||
'transparency' => 'free_busy',
|
||||
'classification' => 'sensitivity',
|
||||
'lastmodified-date' => 'changed',
|
||||
];
|
||||
|
||||
|
|
|
@ -83,7 +83,6 @@ class calendar_ui
|
|||
$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.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.recurrence_form', [$this->cal->lib, 'recurrence_form']);
|
||||
$this->cal->register_handler('plugin.attendees_list', [$this, 'attendees_list']);
|
||||
|
@ -534,21 +533,6 @@ class calendar_ui
|
|||
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
|
||||
*/
|
||||
|
|
|
@ -365,11 +365,6 @@
|
|||
<span class="event-text-old"></span> ⇢
|
||||
<span class="event-text-new"></span>
|
||||
</div>
|
||||
<div class="event-line event-sensitivity">
|
||||
<label><roundcube:label name="calendar.sensitivity" /></label>
|
||||
<span class="event-text-old"></span> ⇢
|
||||
<span class="event-text-new"></span>
|
||||
</div>
|
||||
<div class="form-group row event-attachments">
|
||||
<label><roundcube:label name="attachments" /><span class="index"></span></label>
|
||||
<div class="event-text-old"></div>
|
||||
|
|
|
@ -75,12 +75,6 @@
|
|||
<roundcube:object name="plugin.priority_select" id="edit-priority" class="form-control" />
|
||||
</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">
|
||||
<label for="edit-url" class="col-sm-2 col-form-label"><roundcube:label name="calendar.url" /></label>
|
||||
<div class="col-sm-10">
|
||||
|
|
|
@ -134,12 +134,6 @@
|
|||
<label><roundcube:label name="calendar.priority" /></label>
|
||||
<span class="event-text"></span>
|
||||
</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">
|
||||
<label><roundcube:label name="calendar.created" /></label>
|
||||
<span class="event-text event-created"></span>
|
||||
|
@ -243,11 +237,6 @@
|
|||
<span class="event-text-old"></span> ⇢
|
||||
<span class="event-text-new"></span>
|
||||
</div>
|
||||
<div class="event-line event-sensitivity">
|
||||
<label><roundcube:label name="calendar.sensitivity" /></label>
|
||||
<span class="event-text-old"></span> ⇢
|
||||
<span class="event-text-new"></span>
|
||||
</div>
|
||||
<div class="event-section event-attachments">
|
||||
<label><roundcube:label name="attachments" /><span class="index"></span></label>
|
||||
<div class="event-text-old"></div>
|
||||
|
|
|
@ -66,10 +66,6 @@
|
|||
<label for="edit-priority"><roundcube:label name="calendar.priority" /></label>
|
||||
<roundcube:object name="plugin.priority_select" id="edit-priority" />
|
||||
</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">
|
||||
<label><roundcube:label name="calendar.links" /></label>
|
||||
<div class="event-text"></div>
|
||||
|
|
|
@ -28,8 +28,8 @@ class kolab_folders extends rcube_plugin
|
|||
public $types = array('mail', 'event', 'journal', 'task', 'note', 'contact', 'configuration', 'file', 'freebusy');
|
||||
public $subtypes = array(
|
||||
'mail' => array('inbox', 'drafts', 'sentitems', 'outbox', 'wastebasket', 'junkemail'),
|
||||
'event' => array('default', 'confidential', 'private'),
|
||||
'task' => array('default', 'confidential', 'private'),
|
||||
'event' => array('default'),
|
||||
'task' => array('default'),
|
||||
'journal' => array('default'),
|
||||
'note' => array('default'),
|
||||
'contact' => array('default'),
|
||||
|
|
|
@ -680,7 +680,6 @@ class libcalendaring_itip
|
|||
$emails = $this->lib->get_user_emails();
|
||||
$title = $event['sequence'] > 0 ? $this->gettext('itipupdate') : $this->gettext('itipinvitation');
|
||||
$metadata['rsvp'] = true;
|
||||
$metadata['sensitivity'] = $event['sensitivity'];
|
||||
|
||||
if (is_object($event['start'])) {
|
||||
$metadata['date'] = $event['start']->format('U');
|
||||
|
@ -927,10 +926,6 @@ class libcalendaring_itip
|
|||
$table->add('label', $this->gettext('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')) {
|
||||
$table->add('label', $this->gettext('status'));
|
||||
$table->add('status', $this->gettext('status-' . strtolower($event['status'])));
|
||||
|
|
|
@ -541,11 +541,6 @@ class libvcalendar implements Iterator
|
|||
}
|
||||
break;
|
||||
|
||||
case 'CLASS':
|
||||
case 'X-CALENDARSERVER-ACCESS':
|
||||
$event['sensitivity'] = strtolower($value);
|
||||
break;
|
||||
|
||||
case 'X-MICROSOFT-CDO-BUSYSTATUS':
|
||||
if ($value == 'OOF') {
|
||||
$event['free_busy'] = 'outofoffice';
|
||||
|
@ -1174,9 +1169,6 @@ class libvcalendar implements Iterator
|
|||
$ve->add('STATUS', $event['status']);
|
||||
}
|
||||
|
||||
if (!empty($event['sensitivity']))
|
||||
$ve->add('CLASS', strtoupper($event['sensitivity']));
|
||||
|
||||
if (!empty($event['complete'])) {
|
||||
$ve->add('PERCENT-COMPLETE', intval($event['complete']));
|
||||
}
|
||||
|
|
|
@ -165,7 +165,6 @@ class libvcalendar_test extends PHPUnit\Framework\TestCase
|
|||
|
||||
// categories, class
|
||||
$this->assertEquals('libcalendaring tests', join(',', (array)$event['categories']), "Event categories");
|
||||
$this->assertEquals('confidential', $event['sensitivity'], "Class/sensitivity = confidential");
|
||||
|
||||
// parse a recurrence chain instance
|
||||
$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->assertContains('UID:ac6b0aee-2519-4e5c-9a25-48c57064c9f0', $ics, "Event UID");
|
||||
$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('ORGANIZER;CN=Rolf Test:mailto:rolf@', $ics, "Export organizer");
|
||||
$this->assertRegExp('/ATTENDEE.*;ROLE=REQ-PARTICIPANT/', $ics, "Export Attendee ROLE");
|
||||
|
|
|
@ -31,12 +31,6 @@ class kolab_format_file extends kolab_format
|
|||
protected $read_func = 'kolabformat::readKolabFile';
|
||||
protected $write_func = 'kolabformat::writeKolabFile';
|
||||
|
||||
protected $sensitivity_map = array(
|
||||
'public' => kolabformat::ClassPublic,
|
||||
'private' => kolabformat::ClassPrivate,
|
||||
'confidential' => kolabformat::ClassConfidential,
|
||||
);
|
||||
|
||||
/**
|
||||
* Set properties to the kolabformat object
|
||||
*
|
||||
|
@ -47,7 +41,6 @@ class kolab_format_file extends kolab_format
|
|||
// set common object properties
|
||||
parent::set($object);
|
||||
|
||||
$this->obj->setClassification($this->sensitivity_map[$object['sensitivity']]);
|
||||
$this->obj->setCategories(self::array2vector($object['categories']));
|
||||
|
||||
if (isset($object['notes'])) {
|
||||
|
@ -115,11 +108,8 @@ class kolab_format_file extends kolab_format
|
|||
// read common object props into local data object
|
||||
$object = parent::to_array($data);
|
||||
|
||||
$sensitivity_map = array_flip($this->sensitivity_map);
|
||||
|
||||
// read object properties
|
||||
$object += array(
|
||||
'sensitivity' => $sensitivity_map[$this->obj->classification()],
|
||||
'categories' => self::vector2array($this->obj->categories()),
|
||||
'notes' => $this->obj->note(),
|
||||
);
|
||||
|
|
|
@ -33,12 +33,6 @@ class kolab_format_note extends kolab_format
|
|||
protected $read_func = 'readNote';
|
||||
protected $write_func = 'writeNote';
|
||||
|
||||
protected $sensitivity_map = array(
|
||||
'public' => kolabformat::ClassPublic,
|
||||
'private' => kolabformat::ClassPrivate,
|
||||
'confidential' => kolabformat::ClassConfidential,
|
||||
);
|
||||
|
||||
/**
|
||||
* Set properties to the kolabformat object
|
||||
*
|
||||
|
@ -51,7 +45,6 @@ class kolab_format_note extends kolab_format
|
|||
|
||||
$this->obj->setSummary($object['title']);
|
||||
$this->obj->setDescription($object['description']);
|
||||
$this->obj->setClassification($this->sensitivity_map[$object['sensitivity']]);
|
||||
$this->obj->setCategories(self::array2vector($object['categories']));
|
||||
|
||||
$this->set_attachments($object);
|
||||
|
@ -85,11 +78,8 @@ class kolab_format_note extends kolab_format
|
|||
// read common object props into local data object
|
||||
$object = parent::to_array($data);
|
||||
|
||||
$sensitivity_map = array_flip($this->sensitivity_map);
|
||||
|
||||
// read object properties
|
||||
$object += array(
|
||||
'sensitivity' => $sensitivity_map[$this->obj->classification()],
|
||||
'categories' => self::vector2array($this->obj->categories()),
|
||||
'title' => $this->obj->summary(),
|
||||
'description' => $this->obj->description(),
|
||||
|
|
|
@ -34,12 +34,6 @@ abstract class kolab_format_xcal extends kolab_format
|
|||
|
||||
protected $_scheduling_properties = null;
|
||||
|
||||
protected $sensitivity_map = array(
|
||||
'public' => kolabformat::ClassPublic,
|
||||
'private' => kolabformat::ClassPrivate,
|
||||
'confidential' => kolabformat::ClassConfidential,
|
||||
);
|
||||
|
||||
protected $role_map = array(
|
||||
'REQ-PARTICIPANT' => kolabformat::Required,
|
||||
'OPT-PARTICIPANT' => kolabformat::Optional,
|
||||
|
@ -116,7 +110,6 @@ abstract class kolab_format_xcal extends kolab_format
|
|||
$object = parent::to_array($data);
|
||||
|
||||
$status_map = array_flip($this->status_map);
|
||||
$sensitivity_map = array_flip($this->sensitivity_map);
|
||||
|
||||
$object += array(
|
||||
'sequence' => intval($this->obj->sequence()),
|
||||
|
@ -125,7 +118,6 @@ abstract class kolab_format_xcal extends kolab_format
|
|||
'description' => $this->obj->description(),
|
||||
'url' => $this->obj->url(),
|
||||
'status' => $status_map[$this->obj->status()],
|
||||
'sensitivity' => $sensitivity_map[$this->obj->classification()],
|
||||
'priority' => $this->obj->priority(),
|
||||
'categories' => self::vector2array($this->obj->categories()),
|
||||
'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->setDescription($object['description']);
|
||||
$this->obj->setPriority($object['priority']);
|
||||
$this->obj->setClassification($this->sensitivity_map[$object['sensitivity']]);
|
||||
$this->obj->setCategories(self::array2vector($object['categories']));
|
||||
$this->obj->setUrl(strval($object['url']));
|
||||
|
||||
|
|
|
@ -394,10 +394,6 @@ fieldset.categories .input-group {
|
|||
&.fc-icon-alarms:before {
|
||||
content: @fa-var-bell;
|
||||
}
|
||||
|
||||
&.fc-icon-sensitive:before {
|
||||
content: @fa-var-lock;
|
||||
}
|
||||
}
|
||||
|
||||
.fc-event-temp {
|
||||
|
|
|
@ -46,10 +46,6 @@
|
|||
padding-right: 1em;
|
||||
}
|
||||
|
||||
&.sensitivity {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.recurrence-id {
|
||||
text-transform: uppercase;
|
||||
font-style: italic;
|
||||
|
@ -570,24 +566,6 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1972,7 +1972,7 @@ class tasklist extends rcube_plugin
|
|||
/**
|
||||
* 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) {
|
||||
$lists = $this->driver->get_lists(tasklist_driver::FILTER_PERSONAL | tasklist_driver::FILTER_WRITEABLE);
|
||||
|
@ -1981,10 +1981,6 @@ class tasklist extends rcube_plugin
|
|||
$list = null;
|
||||
|
||||
foreach ($lists as $l) {
|
||||
if ($sensitivity && $l['subtype'] == $sensitivity) {
|
||||
$list = $l;
|
||||
break;
|
||||
}
|
||||
if ($l['default']) {
|
||||
$list = $l;
|
||||
}
|
||||
|
@ -2033,7 +2029,7 @@ class tasklist extends rcube_plugin
|
|||
|
||||
foreach ($tasks as $task) {
|
||||
// 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') {
|
||||
$task = $this->from_ical($task);
|
||||
$task['list'] = $list['id'];
|
||||
|
@ -2121,7 +2117,7 @@ class tasklist extends rcube_plugin
|
|||
|
||||
// select default list except user explicitly selected 'none'
|
||||
if (!$list && !$dontsave) {
|
||||
$list = $this->get_default_tasklist($task['sensitivity'], $lists);
|
||||
$list = $this->get_default_tasklist($lists);
|
||||
}
|
||||
|
||||
$metadata = array(
|
||||
|
@ -2382,7 +2378,7 @@ class tasklist extends rcube_plugin
|
|||
}
|
||||
|
||||
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') . ' ' .
|
||||
$select->show($is_shared ? $existing['list'] : $default_list['id']));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue