[Pkg-owncloud-commits] [php-sabre-vobject] 24/43: SCHEDULE-STATUS must only contain a status code.

David Prévot taffit at moszumanska.debian.org
Sat Jan 10 14:20:15 UTC 2015


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

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

commit 317eac6cfff088ee41524741ea17aac7c6c21a04
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Mon Jan 5 20:46:04 2015 -0500

    SCHEDULE-STATUS must only contain a status code.
    
    Fixes #177.
---
 ChangeLog.md                                  | 2 ++
 lib/ITip/Broker.php                           | 3 ++-
 tests/VObject/ITip/BrokerProcessReplyTest.php | 9 +++------
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ChangeLog.md b/ChangeLog.md
index 825f06f..7f314de 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -6,6 +6,8 @@ ChangeLog
 
 * #168: Expanding calendars now removes objects with recurrence rules that
   don't have a valid recurrence instance.
+* #177: SCHEDULE-STATUS should not contain a reason phrase, only a status
+  code.
 
 
 3.3.4 (2014-11-19)
diff --git a/lib/ITip/Broker.php b/lib/ITip/Broker.php
index 865affb..aefe9fb 100644
--- a/lib/ITip/Broker.php
+++ b/lib/ITip/Broker.php
@@ -341,7 +341,7 @@ class Broker {
             return null;
         }
         $instances = array();
-        $requestStatus = '2.0;Success';
+        $requestStatus = '2.0';
 
         // Finding all the instances the attendee replied to.
         foreach($itipMessage->message->VEVENT as $vevent) {
@@ -350,6 +350,7 @@ class Broker {
             $instances[$recurId] = $attendee['PARTSTAT']->getValue();
             if (isset($vevent->{'REQUEST-STATUS'})) {
                 $requestStatus = $vevent->{'REQUEST-STATUS'}->getValue();
+                list($requestStatus) = explode(';', $requestStatus);
             }
         }
 
diff --git a/tests/VObject/ITip/BrokerProcessReplyTest.php b/tests/VObject/ITip/BrokerProcessReplyTest.php
index 4812be9..0e7e47e 100644
--- a/tests/VObject/ITip/BrokerProcessReplyTest.php
+++ b/tests/VObject/ITip/BrokerProcessReplyTest.php
@@ -59,8 +59,7 @@ VERSION:2.0
 BEGIN:VEVENT
 SEQUENCE:2
 UID:foobar
-ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS="2.0;Success":mailto:foo at example
- .org
+ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:foo at example.org
 ORGANIZER:mailto:bar at example.org
 END:VEVENT
 END:VCALENDAR
@@ -105,8 +104,7 @@ VERSION:2.0
 BEGIN:VEVENT
 UID:foobar
 SEQUENCE:2
-ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS="2.3;foo-bar!":mailto:foo at exampl
- e.org
+ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.3:mailto:foo at example.org
 ORGANIZER:mailto:bar at example.org
 END:VEVENT
 END:VCALENDAR
@@ -414,8 +412,7 @@ VERSION:2.0
 BEGIN:VEVENT
 SEQUENCE:2
 UID:foobar
-ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS="2.0;Success":mailto:foo at example
- .org
+ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:foo at example.org
 ORGANIZER:mailto:bar at example.org
 END:VEVENT
 END:VCALENDAR

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



More information about the Pkg-owncloud-commits mailing list