0011840: iCal 10.11: problem with recurring events
authorPaul Mehrer <p.mehrer@metaways.de>
Tue, 3 May 2016 14:41:57 +0000 (16:41 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 9 May 2016 10:09:08 +0000 (12:09 +0200)
changed href format for invite/user/href

OS X 10.11 ical client doesn't accept a URI formated href
in the invite/user/href tag anymore. Changed format to
urn:uuid

https://forge.tine20.org/view.php?id=11840

Change-Id: I8d59f1da55f3345bfeb1f912e17f8f4b7c753db6
Reviewed-on: http://gerrit.tine20.com/customers/3127
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tests/tine20/Calendar/Frontend/WebDAV/ContainerTest.php
tine20/Calendar/Frontend/WebDAV/Container.php

index bf8139a..d7bc0ae 100644 (file)
@@ -360,8 +360,10 @@ class Calendar_Frontend_WebDAV_ContainerTest extends PHPUnit_Framework_TestCase
         $container = new Calendar_Frontend_WebDAV_Container($this->objects['initialContainer']);
         
         $shares = $container->getShares();
-        
+
         $this->assertEquals(3, count($shares));
+        $this->assertEquals('urn:uuid:anyone', $shares[0]['href']);
+        $this->assertEquals('urn:uuid:' . Tinebase_Core::getUser()->contact_id, $shares[2]['href']);
     }
     
     /**
index 42e57c8..c0da839 100644 (file)
@@ -336,6 +336,11 @@ class Calendar_Frontend_WebDAV_Container extends Tinebase_WebDav_Container_Abstr
     
     /**
      * (non-PHPdoc)
+     *
+     * changed href from URI format /path/to/targetid to urn:uuid:id format due to el capitano ical client
+     * see:
+     * https://service.metaways.net/Ticket/Display.html?id=145985
+     *
      * @see \Sabre\CalDAV\IShareableCalendar::getShares()
      */
     public function getShares()
@@ -354,7 +359,8 @@ class Calendar_Frontend_WebDAV_Container extends Tinebase_WebDav_Container_Abstr
             
             switch ($grant->account_type) {
                 case 'anyone':
-                    $href       = '/principals/groups/anyone';
+                    // was: '/principals/groups/anyone'
+                    $href       = 'urn:uuid:anyone';
                     $commonName = 'Anyone';
                     break;
                 
@@ -364,20 +370,25 @@ class Calendar_Frontend_WebDAV_Container extends Tinebase_WebDav_Container_Abstr
                     } catch (Tinebase_Exception_NotFound $tenf) {
                         continue;
                     }
-                     
-                    $href       = '/principals/groups/' . $list->list_id;
+
+                    // was: '/principals/groups/'
+                    $href       = 'urn:uuid:' . $list->list_id;
                     $commonName = $list->name;
                     
                     break;
                     
                 case 'user':
+                    if ((string)$this->_container->owner_id === (string)$grant->account_id) {
+                        continue;
+                    }
                     try {
                         $contact = Tinebase_User::getInstance()->getUserByPropertyFromSqlBackend('accountId', $grant->account_id);
                     } catch (Tinebase_Exception_NotFound $tenf) {
                         continue;
                     }
-                     
-                    $href       = '/principals/users/' . $contact->contact_id;
+
+                    // was: '/principals/users/'
+                    $href       = 'urn:uuid:' . $contact->contact_id;
                     $commonName = $contact->accountDisplayName;
                     break;
             }