[Pkg-owncloud-commits] [php-sabre-vobject] 04/106: Support for the SCHEDULE-AGENT parameter.
David Prévot
taffit at moszumanska.debian.org
Fri Aug 22 15:10:53 UTC 2014
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 318c482f9e8ab7a8d3c67830b08bcb9ae44249ab
Author: Evert Pot <evert at rooftopsolutions.nl>
Date: Thu Jul 17 01:17:22 2014 -0400
Support for the SCHEDULE-AGENT parameter.
---
lib/Sabre/VObject/ITip/Broker.php | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/lib/Sabre/VObject/ITip/Broker.php b/lib/Sabre/VObject/ITip/Broker.php
index 95fb150..32e97ce 100644
--- a/lib/Sabre/VObject/ITip/Broker.php
+++ b/lib/Sabre/VObject/ITip/Broker.php
@@ -36,6 +36,23 @@ use Sabre\VObject\Reader;
class Broker {
/**
+ * This setting determines wether the rules for the SCHEDULE-AGENT
+ * parameter should be followed.
+ *
+ * This is a parameter defined on ATTENDEE properties, introduced by RFC
+ * 6638. This parameter allows a caldav client to tell the server 'don't do
+ * any scheduling operations'.
+ *
+ * If this setting is turned on, any attendees with SCHEDULE-AGENT set to
+ * CLIENT will be ignored. This is the desired behavior for a CalDAV
+ * server, but if you're writing an iTip application that doesn't deal with
+ * CalDAV, you may want to ignore this parameter.
+ *
+ * @var bool
+ */
+ public $scheduleAgentServerRules = true;
+
+ /**
* This function parses a VCALENDAR object, and if the object had an
* organizer and attendees, it will generate iTip messages for every
* attendee.
@@ -327,6 +344,12 @@ class Broker {
$value = isset($vevent->{'RECURRENCE-ID'})?$vevent->{'RECURRENCE-ID'}->getValue():'master';
if(isset($vevent->ATTENDEE)) foreach($vevent->ATTENDEE as $attendee) {
+ if ($this->followScheduleAgentRules &&
+ isset($attendee['SCHEDULE-AGENT']) &&
+ strtoupper($attendee['SCHEDULE-AGENT']->getValue()) === 'CLIENT'
+ ) {
+ continue;
+ }
if (isset($attendees[$attendee->getValue()])) {
$attendees[$attendee->getValue()]['instances'][] = $value;
} else {
--
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