[Pkg-owncloud-commits] [php-sabredav] 120/275: support for schedule-reply header
David Prévot
taffit at moszumanska.debian.org
Thu Sep 25 14:55:59 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 c2c36570a44256252468a4e8c8325f94a3fb8559
Author: Dominik Tobschall <dominik at fruux.com>
Date: Thu Jul 31 23:48:32 2014 +0200
support for schedule-reply header
---
lib/CalDAV/Schedule/Plugin.php | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/lib/CalDAV/Schedule/Plugin.php b/lib/CalDAV/Schedule/Plugin.php
index 7acffcf..faefd3f 100644
--- a/lib/CalDAV/Schedule/Plugin.php
+++ b/lib/CalDAV/Schedule/Plugin.php
@@ -266,6 +266,10 @@ class Plugin extends ServerPlugin {
return;
}
+ if (!$this->scheduleReply($this->server->httpRequest)) {
+ return;
+ }
+
// It's a calendar, so the contents are most likely an iCalendar
// object. It's time to start processing this.
//
@@ -313,6 +317,10 @@ class Plugin extends ServerPlugin {
return;
}
+ if (!$this->scheduleReply($this->server->httpRequest)) {
+ return;
+ }
+
// It's a calendar, so the contents are most likely an iCalendar
// object. It's time to start processing this.
//
@@ -381,6 +389,10 @@ class Plugin extends ServerPlugin {
return;
}
+ if (!$this->scheduleReply($this->server->httpRequest)) {
+ return;
+ }
+
$addresses = $this->getAddressesForPrincipal(
$node->getOwner()
);
@@ -856,4 +868,19 @@ class Plugin extends ServerPlugin {
'href' => 'mailto:' . $email,
];
}
+
+ /**
+ * This method checks the 'Schedule-Reply' header
+ * and returns false if it's 'F', otherwise true.
+ *
+ * @param RequestInterface $request
+ * @return bool
+ */
+ private function scheduleReply(RequestInterface $request) {
+
+ $scheduleReply = $request->getHeader('Schedule-Reply');
+ return strpos($scheduleReply, 'F')!=='0';
+
+ }
+
}
--
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