Fix tasklist selection when saving task (#4182)

This commit is contained in:
Thomas Bruederli 2015-04-22 10:58:26 +02:00
parent fb990e26c7
commit 6421f5f6e2
2 changed files with 9 additions and 2 deletions

View file

@ -1361,8 +1361,14 @@ class tasklist_kolab_driver extends tasklist_driver
{ {
$this->_parse_id($task); $this->_parse_id($task);
$list_id = $task['list']; $list_id = $task['list'];
if (!$list_id || !($folder = $this->get_folder($list_id))) if (!$list_id || !($folder = $this->get_folder($list_id))) {
raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Invalid list identifer to save taks: " . var_dump($list_id, true)),
true, false);
return false; return false;
}
// email links and tags are stored separately // email links and tags are stored separately
$links = $task['links']; $links = $task['links'];

View file

@ -2421,9 +2421,10 @@ function rcube_tasklist_ui(settings)
data._status_before = me.selected_task.status + ''; data._status_before = me.selected_task.status + '';
// copy form field contents into task object to save // copy form field contents into task object to save
$.each({ title:title, description:description, date:recdate, time:rectime, startdate:recstartdate, starttime:recstarttime, status:taskstatus, list:tasklist }, function(key,input){ $.each({ title:title, description:description, date:recdate, time:rectime, startdate:recstartdate, starttime:recstarttime, status:taskstatus }, function(key,input){
data[key] = input.val(); data[key] = input.val();
}); });
data.list = tasklist.find('option:selected').val();
data.tags = []; data.tags = [];
data.attachments = []; data.attachments = [];
data.attendees = task_attendees; data.attendees = task_attendees;