[Pkg-owncloud-commits] [php-sabredav] 118/275: calendar-user-address-set is useful outside of scheduling.

David Prévot taffit at moszumanska.debian.org
Thu Sep 25 14:55:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit bed461baa2ce5db876ac8a1ef85cfb261f42e280
Author: Evert Pot <me at evertpot.com>
Date:   Thu Jul 31 14:44:47 2014 -0400

    calendar-user-address-set is useful outside of scheduling.
---
 lib/CalDAV/Plugin.php          | 12 ++++++++++--
 lib/CalDAV/Schedule/Plugin.php |  8 --------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/CalDAV/Plugin.php b/lib/CalDAV/Plugin.php
index 03e7331..7342085 100644
--- a/lib/CalDAV/Plugin.php
+++ b/lib/CalDAV/Plugin.php
@@ -4,6 +4,7 @@ namespace Sabre\CalDAV;
 
 use
     Sabre\DAV,
+    Sabre\DAV\Property\HrefList,
     Sabre\DAVACL,
     Sabre\VObject,
     Sabre\HTTP,
@@ -312,6 +313,13 @@ class Plugin extends DAV\ServerPlugin {
                 return new DAV\Property\Href($calendarHomePath);
 
             });
+            // The calendar-user-address-set property is basically mapped to
+            // the {DAV:}alternate-URI-set property.
+            $propFind->handle('{' . self::NS_CALDAV . '}calendar-user-address-set', function() use ($node) {
+                $addresses = $node->getAlternateUriSet();
+                $addresses[] = $this->server->getBaseUri() . $node->getPrincipalUrl() . '/';
+                return new HrefList($addresses, false);
+            });
 
             // These two properties are shortcuts for ical to easily find
             // other principals this principal has access to.
@@ -341,8 +349,8 @@ class Plugin extends DAV\ServerPlugin {
 
                 }
 
-                $propFind->set($propRead, new DAV\Property\HrefList($readList));
-                $propFind->set($propWrite, new DAV\Property\HrefList($writeList));
+                $propFind->set($propRead, new HrefList($readList));
+                $propFind->set($propWrite, new HrefList($writeList));
 
             }
 
diff --git a/lib/CalDAV/Schedule/Plugin.php b/lib/CalDAV/Schedule/Plugin.php
index 3fbecc6..fde6087 100644
--- a/lib/CalDAV/Schedule/Plugin.php
+++ b/lib/CalDAV/Schedule/Plugin.php
@@ -268,14 +268,6 @@ class Plugin extends ServerPlugin {
 
         });
 
-        // The calendar-user-address-set property is basically mapped to
-        // the {DAV:}alternate-URI-set property.
-        $propFind->handle('{' . self::NS_CALDAV . '}calendar-user-address-set', function() use ($node) {
-            $addresses = $node->getAlternateUriSet();
-            $addresses[] = $this->server->getBaseUri() . $node->getPrincipalUrl() . '/';
-            return new HrefList($addresses, false);
-        });
-
         // The server currently reports every principal to be of type
         // 'INDIVIDUAL'
         $propFind->handle('{' . self::NS_CALDAV . '}calendar-user-type', function() {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list