summaryrefslogtreecommitdiff
path: root/plugins/libcalendaring/libcalendaring.php
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-07-30 15:40:53 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-07-30 15:40:53 (GMT)
commitb3c5acd66a088248c5634bdb14e5faa3e2011cf4 (patch)
tree2c0b9ec890d01d9631e2c08199f4946e4803e091 /plugins/libcalendaring/libcalendaring.php
parent445edd09b76fc5e029e5f94e70a64a89907ae965 (diff)
downloadroundcubemail-plugins-kolab-b3c5acd66a088248c5634bdb14e5faa3e2011cf4.tar.gz
- Fix task attendees and organizer setting and display
- Make basic iTip exchange for task assignments work - Improve wording for task assignments
Diffstat (limited to 'plugins/libcalendaring/libcalendaring.php')
-rw-r--r--plugins/libcalendaring/libcalendaring.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php
index 5a1a8b0..36fc287 100644
--- a/plugins/libcalendaring/libcalendaring.php
+++ b/plugins/libcalendaring/libcalendaring.php
@@ -247,11 +247,25 @@ class libcalendaring extends rcube_plugin
*/
public function event_date_text($event, $tzinfo = false)
{
- $fromto = '';
+ $fromto = '--';
+
+ // handle task objects
+ if ($event['_type'] == 'task' && is_object($event['due'])) {
+ $date_format = $event['due']->_dateonly ? self::to_php_date_format($this->rc->config->get('calendar_date_format', $this->defaults['calendar_date_format'])) : null;
+ $fromto = $this->rc->format_date($event['due'], $date_format, false);
+
+ // add timezone information
+ if ($fromto && $tzinfo && ($tzname = $this->timezone->getName())) {
+ $fromto .= ' (' . strtr($tzname, '_', ' ') . ')';
+ }
+
+ return $fromto;
+ }
// abort if no valid event dates are given
- if (!is_object($event['start']) || !is_a($event['start'], 'DateTime') || !is_object($event['end']) || !is_a($event['end'], 'DateTime'))
+ if (!is_object($event['start']) || !is_a($event['start'], 'DateTime') || !is_object($event['end']) || !is_a($event['end'], 'DateTime')) {
return $fromto;
+ }
$duration = $event['start']->diff($event['end'])->format('s');