diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-04-20 22:56:59 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-04-20 22:56:59 +0200 |
commit | 3d68732657dee0e131bb54c6ca4c4052cce7ce2f (patch) | |
tree | 99adcd950471cad68ca787a0a00a0052f8c4f1b8 /apps/tasks/ajax/update_property.php | |
parent | 1384be4bff8544244c689ecb69e43ea09654416b (diff) | |
download | nextcloud-server-3d68732657dee0e131bb54c6ca4c4052cce7ce2f.tar.gz nextcloud-server-3d68732657dee0e131bb54c6ca4c4052cce7ce2f.zip |
Tasks: Due date without time support added
Diffstat (limited to 'apps/tasks/ajax/update_property.php')
-rw-r--r-- | apps/tasks/ajax/update_property.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/tasks/ajax/update_property.php b/apps/tasks/ajax/update_property.php index 66ff34f8482..2ce5f1a1f51 100644 --- a/apps/tasks/ajax/update_property.php +++ b/apps/tasks/ajax/update_property.php @@ -23,18 +23,24 @@ switch($property) { break; case 'due': $due = $_POST['due']; + $due_date_only = $_POST['date']; + $type = null; if ($due != 'false') { try { $timezone = OC_Preferences::getValue(OC_User::getUser(), 'calendar', 'timezone', date_default_timezone_get()); $timezone = new DateTimeZone($timezone); $due = new DateTime('@'.$due); $due->setTimezone($timezone); + $type = Sabre_VObject_Element_DateTime::LOCALTZ; + if ($due_date_only) { + $type = Sabre_VObject_Element_DateTime::DATE; + } } catch (Exception $e) { OC_JSON::error(array('data'=>array('message'=>OC_Task_App::$l10n->t('Invalid date/time')))); exit(); } } - $vtodo->setDateTime('DUE', $due); + $vtodo->setDateTime('DUE', $due, $type); break; case 'complete': $checked = $_POST['checked']; |