[Pkg-owncloud-commits] [php-sabredav] 28/64: Added plugin information to a few more plugins.
David Prévot
taffit at moszumanska.debian.org
Thu Dec 11 15:13:24 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag 2.2.0alpha1
in repository php-sabredav.
commit b0f5bb6eb02b0cbc576e3bc5bb92e36068c6a2f1
Author: Evert Pot <evert at rooftopsolutions.nl>
Date: Thu Nov 20 17:07:48 2014 -0500
Added plugin information to a few more plugins.
Fixed a unittest problem.
---
lib/CalDAV/Notifications/Plugin.php | 21 +++++++++++++++++++
lib/CalDAV/Schedule/IMipPlugin.php | 21 +++++++++++++++++++
lib/CalDAV/SharingPlugin.php | 20 ++++++++++++++++++
lib/CalDAV/Subscriptions/Subscription.php | 21 +++++++++++++++++++
lib/DAV/PropertyStorage/Plugin.php | 35 +++++++++++++++++++++++++++++++
tests/Sabre/DAV/Browser/PluginTest.php | 1 +
6 files changed, 119 insertions(+)
diff --git a/lib/CalDAV/Notifications/Plugin.php b/lib/CalDAV/Notifications/Plugin.php
index 4da7a84..c98bf78 100644
--- a/lib/CalDAV/Notifications/Plugin.php
+++ b/lib/CalDAV/Notifications/Plugin.php
@@ -159,4 +159,25 @@ class Plugin extends ServerPlugin {
}
+ /**
+ * Returns a bunch of meta-data about the plugin.
+ *
+ * Providing this information is optional, and is mainly displayed by the
+ * Browser plugin.
+ *
+ * The description key in the returned array may contain html and will not
+ * be sanitized.
+ *
+ * @return array
+ */
+ function getPluginInfo() {
+
+ return [
+ 'name' => $this->getPluginName(),
+ 'description' => 'Adds support for caldav-notifications, which is required to enable caldav-sharing.',
+ 'link' => 'http://sabre.io/dav/caldav-sharing/',
+ ];
+
+ }
+
}
diff --git a/lib/CalDAV/Schedule/IMipPlugin.php b/lib/CalDAV/Schedule/IMipPlugin.php
index 5b0f9de..96c4c9a 100644
--- a/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/lib/CalDAV/Schedule/IMipPlugin.php
@@ -167,4 +167,25 @@ class IMipPlugin extends DAV\ServerPlugin {
// @codeCoverageIgnoreEnd
+ /**
+ * Returns a bunch of meta-data about the plugin.
+ *
+ * Providing this information is optional, and is mainly displayed by the
+ * Browser plugin.
+ *
+ * The description key in the returned array may contain html and will not
+ * be sanitized.
+ *
+ * @return array
+ */
+ function getPluginInfo() {
+
+ return [
+ 'name' => $this->getPluginName(),
+ 'description' => 'Email delivery (rfc6037) for CalDAV scheduling',
+ 'link' => 'http://sabre.io/dav/scheduling/',
+ ];
+
+ }
+
}
diff --git a/lib/CalDAV/SharingPlugin.php b/lib/CalDAV/SharingPlugin.php
index c668fe5..5b289a6 100644
--- a/lib/CalDAV/SharingPlugin.php
+++ b/lib/CalDAV/SharingPlugin.php
@@ -499,4 +499,24 @@ class SharingPlugin extends DAV\ServerPlugin {
}
+ /**
+ * Returns a bunch of meta-data about the plugin.
+ *
+ * Providing this information is optional, and is mainly displayed by the
+ * Browser plugin.
+ *
+ * The description key in the returned array may contain html and will not
+ * be sanitized.
+ *
+ * @return array
+ */
+ function getPluginInfo() {
+
+ return [
+ 'name' => $this->getPluginName(),
+ 'description' => 'Adds support for caldav-sharing.',
+ 'link' => 'http://sabre.io/dav/caldav-sharing/',
+ ];
+
+ }
}
diff --git a/lib/CalDAV/Subscriptions/Subscription.php b/lib/CalDAV/Subscriptions/Subscription.php
index 0c31c01..14831e5 100644
--- a/lib/CalDAV/Subscriptions/Subscription.php
+++ b/lib/CalDAV/Subscriptions/Subscription.php
@@ -274,4 +274,25 @@ class Subscription extends Collection implements ISubscription, IACL {
}
+ /**
+ * Returns a bunch of meta-data about the plugin.
+ *
+ * Providing this information is optional, and is mainly displayed by the
+ * Browser plugin.
+ *
+ * The description key in the returned array may contain html and will not
+ * be sanitized.
+ *
+ * @return array
+ */
+ function getPluginInfo() {
+
+ return [
+ 'name' => $this->getPluginName(),
+ 'description' => 'This plugin allows users to store iCalendar subscriptions in their calendar-home.',
+ 'link' => null,
+ ];
+
+ }
+
}
diff --git a/lib/DAV/PropertyStorage/Plugin.php b/lib/DAV/PropertyStorage/Plugin.php
index 14f60bf..8d6c5e0 100644
--- a/lib/DAV/PropertyStorage/Plugin.php
+++ b/lib/DAV/PropertyStorage/Plugin.php
@@ -127,4 +127,39 @@ class Plugin extends ServerPlugin {
$this->backend->move($source, $destination);
}
+
+ /**
+ * Returns a plugin name.
+ *
+ * Using this name other plugins will be able to access other plugins
+ * using \Sabre\DAV\Server::getPlugin
+ *
+ * @return string
+ */
+ function getPluginName() {
+
+ return 'property-storage';
+
+ }
+
+ /**
+ * Returns a bunch of meta-data about the plugin.
+ *
+ * Providing this information is optional, and is mainly displayed by the
+ * Browser plugin.
+ *
+ * The description key in the returned array may contain html and will not
+ * be sanitized.
+ *
+ * @return array
+ */
+ function getPluginInfo() {
+
+ return [
+ 'name' => $this->getPluginName(),
+ 'description' => 'This plugin allows any arbitrary WebDAV property to be set on any resource.',
+ 'link' => 'http://sabre.io/dav/property-storage/',
+ ];
+
+ }
}
diff --git a/tests/Sabre/DAV/Browser/PluginTest.php b/tests/Sabre/DAV/Browser/PluginTest.php
index b1ea646..7d5a1a1 100644
--- a/tests/Sabre/DAV/Browser/PluginTest.php
+++ b/tests/Sabre/DAV/Browser/PluginTest.php
@@ -131,6 +131,7 @@ class PluginTest extends DAV\AbstractServer{
'Content-Type' => ['image/vnd.microsoft.icon'],
'Content-Length' => ['4286'],
'Cache-Control' => ['public, max-age=1209600'],
+ 'Content-Security-Policy' => ["img-src 'self'; style-src 'self';"]
], $this->response->getHeaders());
}
--
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