Commit 1587330c authored by Daniel Morlock's avatar Daniel Morlock
Browse files

Properly get calendar and driver instances if requested.

parent a6a459dc
......@@ -2914,11 +2914,12 @@ class calendar extends rcube_plugin
$dontsave = ($_REQUEST['_folder'] === '' && $event['_method'] == 'REQUEST');
// select default calendar except user explicitly selected 'none'
if (!$calendar && !$dontsave)
$calendar = $this->get_default_calendar(true, $event['sensitivity'] == 'confidential');
if(!$driver)
$driver = $this->get_driver_by_cal($calendar);
if(!$dontsave) {
if (!$calendar) {
$calendar = $this->get_default_calendar(true, $event['sensitivity'] == 'confidential');
$driver = $this->get_driver_by_cal($calendar["id"]);
}
}
$metadata = array(
'uid' => $event['uid'],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment