3 commits - plugins/calendar plugins/libkolab

Thomas Brüderli bruederli at kolabsys.com
Thu May 16 14:52:25 CEST 2013


 plugins/calendar/calendar.php              |   17 +++++++++++++++++
 plugins/libkolab/lib/kolab_format_xcal.php |    8 ++------
 2 files changed, 19 insertions(+), 6 deletions(-)

New commits:
commit c4bbdbfd85eba2f94c49fbae421cc88b5e4ee28f
Merge: 4196be5 8ee1044
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Thu May 16 14:51:56 2013 +0200

    Merge branch 'master' of ssh://git.kolab.org/git/roundcubemail-plugins-kolab



commit 4196be5b3a92a50efecd5cfc4d1c5ce2047d6f1e
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Thu May 16 14:51:32 2013 +0200

    Fix usage of KolabEvent url setter/getter

diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php
index d9e1d0e..24f8237 100644
--- a/plugins/libkolab/lib/kolab_format_xcal.php
+++ b/plugins/libkolab/lib/kolab_format_xcal.php
@@ -113,6 +113,7 @@ abstract class kolab_format_xcal extends kolab_format
             'title'       => $this->obj->summary(),
             'location'    => $this->obj->location(),
             'description' => $this->obj->description(),
+            'url'         => $this->obj->url(),
             'status'      => $status_map[$this->obj->status()],
             'sensitivity' => $sensitivity_map[$this->obj->classification()],
             'priority'    => $this->obj->priority(),
@@ -245,12 +246,7 @@ abstract class kolab_format_xcal extends kolab_format
         $this->obj->setPriority($object['priority']);
         $this->obj->setClassification($this->sensitivity_map[$object['sensitivity']]);
         $this->obj->setCategories(self::array2vector($object['categories']));
-
-        $vurls = new vectorurl;
-        foreach ((array)$object['url'] as $url) {
-            $vurls->push(new Url(strval($url)));
-        }
-        $this->obj->setUrls($vurls);
+        $this->obj->setUrl(strval($object['url']));
 
         // process event attendees
         $attendees = new vectorattendee;


commit 5627ffb7313800b5621a989a7392928e515e751f
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Thu May 16 14:40:38 2013 +0200

    Copy event organizer to attendees list if necessary

diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index 1a94167..d4e6c84 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -1098,6 +1098,23 @@ class calendar extends rcube_plugin
       $event['attachments'][$k]['classname'] = rcube_utils::file2class($attachment['mimetype'], $attachment['name']);
     }
 
+    // check for organizer in attendees list
+    $organizer = null;
+    foreach ((array)$event['attendees'] as $i => $attendee) {
+      if ($attendee['role'] == 'ORGANIZER') {
+        $organizer = $attendee;
+        break;
+      }
+    }
+
+    if ($organizer === null && !empty($event['organizer'])) {
+      $organizer = $event['organizer'];
+      $organizer['role'] = 'ORGANIZER';
+      if (!is_array($event['attendees']))
+        $event['attendees'] = array();
+      array_unshift($event['attendees'], $organizer);
+    }
+
     // mapping url => vurl because of the fullcalendar client script
     $event['vurl'] = $event['url'];
     unset($event['url']);





More information about the commits mailing list