[Pkg-owncloud-commits] [php-sabredav] 60/275: Merge branch 'master' into calendar-auto-schedule
David Prévot
taffit at moszumanska.debian.org
Thu Sep 25 14:55:52 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 8c00d834dcb5212eabc48580e69990ffcf8f7508
Merge: f167b4b 0762124
Author: Evert Pot <evert at rooftopsolutions.nl>
Date: Tue Jun 10 16:34:14 2014 -0400
Merge branch 'master' into calendar-auto-schedule
Conflicts:
bin/migrateto20.php
examples/calendarserver.php
lib/CalDAV/Plugin.php
tests/Sabre/DAVServerTest.php
tests/bootstrap.php
.gitignore | 18 +-
.travis.yml | 6 +-
ChangeLog.md | 95 +-
README.md | 3 +-
bin/build.php | 168 +
bin/{migrateto19.php => migrateto20.php} | 188 +-
bin/migrateto21.php | 146 +
build.xml | 88 -
composer.json | 17 +-
docs/caldav-ctag.txt | 336 -
docs/caldav-notifications.txt | 1568 ---
docs/caldav-proxy.txt | 672 -
docs/caldav-sharing.txt | 1624 ---
docs/draft-daboo-carddav-directory-gateway-02.txt | 560 -
docs/draft-ietf-httpbis-p1-messaging-21.txt | 5040 -------
docs/draft-ietf-httpbis-p4-conditional-21.txt | 1400 --
docs/draft-ietf-httpbis-p5-range-21.txt | 1344 --
docs/draft-ietf-httpbis-p6-cache-21.txt | 2296 ----
docs/rfc2425.txt | 1851 ---
docs/rfc2426.txt | 2355 ----
docs/rfc2518.txt | 5267 -------
docs/rfc2616.txt | 9859 --------------
docs/rfc2617.txt | 1907 ---
docs/rfc3253.pdf | 10329 --------------
docs/rfc3744.pdf | 6295 ---------
docs/rfc4437.pdf | 3127 -----
docs/rfc4790.txt | 1459 --
docs/rfc4791.txt | 5995 --------
docs/rfc4918.pdf | 13609 -------------------
docs/rfc5051.txt | 395 -
docs/rfc5397.txt | 281 -
docs/rfc5545.txt | 9411 -------------
docs/rfc5546.txt | 7451 ----------
docs/rfc5689.txt | 675 -
docs/rfc5785.txt | 451 -
docs/rfc5789.txt | 563 -
docs/rfc6047.txt | 1235 --
docs/rfc6321.txt | 3027 -----
docs/rfc6350.txt | 4147 ------
docs/rfc6351.txt | 1235 --
docs/rfc6352.txt | 2691 ----
docs/rfc6578.txt | 1627 ---
docs/rfc6585.txt | 563 -
docs/rfc6638.txt | 4371 ------
examples/groupwareserver.php | 4 +-
examples/sql/mysql.addressbook.sql | 6 +-
examples/sql/mysql.calendars.sql | 20 +-
examples/sql/mysql.locks.sql | 6 +-
examples/sql/mysql.propertystorage.sql | 7 +
examples/sql/pgsql.addressbook.sql | 23 +-
examples/sql/pgsql.calendars.sql | 26 +-
examples/sql/pgsql.locks.sql | 12 +-
examples/sql/pgsql.principals.sql | 2 +-
examples/sql/pgsql.propertystorage.sql | 12 +
examples/sql/pgsql.users.sql | 3 +-
examples/sql/sqlite.addressbooks.sql | 4 +-
examples/sql/sqlite.propertystorage.sql | 9 +
lib/{Sabre => }/CalDAV/Backend/AbstractBackend.php | 0
.../CalDAV/Backend/BackendInterface.php | 0
.../CalDAV/Backend/NotificationSupport.php | 0
lib/{Sabre => }/CalDAV/Backend/PDO.php | 2 +-
lib/{Sabre => }/CalDAV/Backend/SharingSupport.php | 0
.../CalDAV/Backend/SubscriptionSupport.php | 0
lib/{Sabre => }/CalDAV/Backend/SyncSupport.php | 0
lib/{Sabre => }/CalDAV/Calendar.php | 0
lib/{Sabre => }/CalDAV/CalendarObject.php | 0
lib/{Sabre => }/CalDAV/CalendarQueryParser.php | 0
lib/{Sabre => }/CalDAV/CalendarQueryValidator.php | 0
lib/{Sabre => }/CalDAV/CalendarRootNode.php | 0
.../CalDAV/Exception/InvalidComponentType.php | 0
lib/{Sabre => }/CalDAV/ICSExportPlugin.php | 0
lib/{Sabre => }/CalDAV/ICalendar.php | 0
lib/{Sabre => }/CalDAV/ICalendarObject.php | 0
lib/{Sabre => }/CalDAV/IShareableCalendar.php | 0
lib/{Sabre => }/CalDAV/ISharedCalendar.php | 0
.../CalDAV/Notifications/Collection.php | 0
.../CalDAV/Notifications/ICollection.php | 0
lib/{Sabre => }/CalDAV/Notifications/INode.php | 0
.../CalDAV/Notifications/INotificationType.php | 0
lib/{Sabre => }/CalDAV/Notifications/Node.php | 0
.../CalDAV/Notifications/Notification/Invite.php | 0
.../Notifications/Notification/InviteReply.php | 0
.../Notifications/Notification/SystemStatus.php | 0
lib/{Sabre => }/CalDAV/Plugin.php | 90 +-
lib/{Sabre => }/CalDAV/Principal/Collection.php | 0
lib/{Sabre => }/CalDAV/Principal/IProxyRead.php | 0
lib/{Sabre => }/CalDAV/Principal/IProxyWrite.php | 0
lib/{Sabre => }/CalDAV/Principal/ProxyRead.php | 0
lib/{Sabre => }/CalDAV/Principal/ProxyWrite.php | 0
lib/{Sabre => }/CalDAV/Principal/User.php | 0
.../CalDAV/Property/AllowedSharingModes.php | 0
lib/{Sabre => }/CalDAV/Property/Invite.php | 0
.../CalDAV/Property/ScheduleCalendarTransp.php | 0
.../Property/SupportedCalendarComponentSet.php | 0
.../CalDAV/Property/SupportedCalendarData.php | 0
.../CalDAV/Property/SupportedCollationSet.php | 0
lib/{Sabre => }/CalDAV/Schedule/IMip.php | 0
lib/{Sabre => }/CalDAV/Schedule/IOutbox.php | 0
lib/{Sabre => }/CalDAV/Schedule/Outbox.php | 0
lib/{Sabre => }/CalDAV/ShareableCalendar.php | 0
lib/{Sabre => }/CalDAV/SharedCalendar.php | 0
lib/{Sabre => }/CalDAV/SharingPlugin.php | 82 +-
.../CalDAV/Subscriptions/ISubscription.php | 5 +-
lib/{Sabre => }/CalDAV/Subscriptions/Plugin.php | 12 +-
.../CalDAV/Subscriptions/Subscription.php | 0
lib/{Sabre => }/CalDAV/UserCalendars.php | 0
lib/{Sabre => }/CardDAV/AddressBook.php | 0
lib/{Sabre => }/CardDAV/AddressBookQueryParser.php | 0
lib/{Sabre => }/CardDAV/AddressBookRoot.php | 0
.../CardDAV/Backend/AbstractBackend.php | 0
.../CardDAV/Backend/BackendInterface.php | 4 +-
lib/{Sabre => }/CardDAV/Backend/PDO.php | 62 +-
lib/{Sabre => }/CardDAV/Backend/SyncSupport.php | 0
lib/{Sabre => }/CardDAV/Card.php | 0
lib/{Sabre => }/CardDAV/IAddressBook.php | 0
lib/{Sabre => }/CardDAV/ICard.php | 0
lib/{Sabre => }/CardDAV/IDirectory.php | 0
lib/{Sabre => }/CardDAV/Plugin.php | 65 +-
.../CardDAV/Property/SupportedAddressData.php | 0
lib/{Sabre => }/CardDAV/UserAddressBooks.php | 2 +-
lib/{Sabre => }/CardDAV/VCFExportPlugin.php | 0
lib/{Sabre => }/DAV/Auth/Backend/AbstractBasic.php | 0
.../DAV/Auth/Backend/AbstractDigest.php | 0
lib/{Sabre => }/DAV/Auth/Backend/Apache.php | 0
.../DAV/Auth/Backend/BackendInterface.php | 0
lib/{Sabre => }/DAV/Auth/Backend/BasicCallBack.php | 0
lib/{Sabre => }/DAV/Auth/Backend/File.php | 0
lib/{Sabre => }/DAV/Auth/Backend/PDO.php | 0
lib/{Sabre => }/DAV/Auth/Plugin.php | 0
lib/{Sabre => }/DAV/Browser/GuessContentType.php | 29 +-
lib/{Sabre => }/DAV/Browser/MapGetToPropFind.php | 0
lib/DAV/Browser/Plugin.php | 609 +
lib/DAV/Browser/PropFindAll.php | 132 +
lib/{Sabre => }/DAV/Browser/assets/favicon.ico | Bin
lib/DAV/Browser/assets/openiconic/ICON-LICENSE | 21 +
lib/DAV/Browser/assets/openiconic/open-iconic.css | 511 +
lib/DAV/Browser/assets/openiconic/open-iconic.eot | Bin 0 -> 23144 bytes
lib/DAV/Browser/assets/openiconic/open-iconic.otf | Bin 0 -> 21048 bytes
lib/DAV/Browser/assets/openiconic/open-iconic.svg | 543 +
lib/DAV/Browser/assets/openiconic/open-iconic.ttf | Bin 0 -> 25568 bytes
lib/DAV/Browser/assets/openiconic/open-iconic.woff | Bin 0 -> 12404 bytes
lib/DAV/Browser/assets/sabredav.css | 210 +
lib/DAV/Browser/assets/sabredav.png | Bin 0 -> 2825 bytes
lib/{Sabre => }/DAV/Client.php | 0
lib/{Sabre => }/DAV/Collection.php | 0
lib/{Sabre => }/DAV/CorePlugin.php | 110 +-
lib/{Sabre => }/DAV/Exception.php | 0
lib/{Sabre => }/DAV/Exception/BadRequest.php | 0
lib/{Sabre => }/DAV/Exception/Conflict.php | 0
lib/{Sabre => }/DAV/Exception/ConflictingLock.php | 0
lib/{Sabre => }/DAV/Exception/FileNotFound.php | 0
lib/{Sabre => }/DAV/Exception/Forbidden.php | 0
.../DAV/Exception/InsufficientStorage.php | 0
.../DAV/Exception/InvalidResourceType.php | 0
lib/{Sabre => }/DAV/Exception/InvalidSyncToken.php | 0
.../Exception/LengthRequired.php} | 10 +-
.../DAV/Exception/LockTokenMatchesRequestUri.php | 0
lib/{Sabre => }/DAV/Exception/Locked.php | 0
lib/{Sabre => }/DAV/Exception/MethodNotAllowed.php | 0
lib/{Sabre => }/DAV/Exception/NotAuthenticated.php | 0
lib/{Sabre => }/DAV/Exception/NotFound.php | 0
lib/{Sabre => }/DAV/Exception/NotImplemented.php | 0
lib/{Sabre => }/DAV/Exception/PaymentRequired.php | 0
.../DAV/Exception/PreconditionFailed.php | 0
.../DAV/Exception/ReportNotSupported.php | 0
.../DAV/Exception/RequestedRangeNotSatisfiable.php | 0
.../DAV/Exception/ServiceUnavailable.php | 0
lib/{Sabre => }/DAV/Exception/TooMuchMatches.php | 0
.../DAV/Exception/UnsupportedMediaType.php | 0
lib/{Sabre => }/DAV/FS/Directory.php | 0
lib/{Sabre => }/DAV/FS/File.php | 0
lib/{Sabre => }/DAV/FS/Node.php | 0
lib/{Sabre => }/DAV/FSExt/Directory.php | 0
lib/{Sabre => }/DAV/FSExt/File.php | 48 +-
lib/{Sabre => }/DAV/FSExt/Node.php | 0
lib/{Sabre => }/DAV/File.php | 0
lib/{Sabre => }/DAV/ICollection.php | 0
lib/{Sabre => }/DAV/IExtendedCollection.php | 0
lib/{Sabre => }/DAV/IFile.php | 0
lib/{Sabre => }/DAV/IMultiGet.php | 0
lib/{Sabre => }/DAV/INode.php | 0
lib/{Sabre => }/DAV/IProperties.php | 0
lib/{Sabre => }/DAV/IQuota.php | 0
.../DAV/Locks/Backend/AbstractBackend.php | 0
.../DAV/Locks/Backend/BackendInterface.php | 0
lib/{Sabre => }/DAV/Locks/Backend/FS.php | 0
lib/{Sabre => }/DAV/Locks/Backend/File.php | 0
lib/{Sabre => }/DAV/Locks/Backend/PDO.php | 0
lib/{Sabre => }/DAV/Locks/LockInfo.php | 0
lib/{Sabre => }/DAV/Locks/Plugin.php | 49 +-
lib/{Sabre => }/DAV/Mount/Plugin.php | 0
lib/{Sabre => }/DAV/Node.php | 0
lib/{Sabre => }/DAV/ObjectTree.php | 0
lib/{Sabre => }/DAV/PartialUpdate/IFile.php | 5 +-
.../PartialUpdate/IPatchSupport.php} | 24 +-
lib/{Sabre => }/DAV/PartialUpdate/Plugin.php | 100 +-
lib/DAV/PropFind.php | 330 +
lib/{Sabre => }/DAV/PropPatch.php | 0
lib/{Sabre => }/DAV/Property.php | 0
lib/{Sabre => }/DAV/Property/GetLastModified.php | 0
lib/{Sabre => }/DAV/Property/Href.php | 0
lib/{Sabre => }/DAV/Property/HrefList.php | 0
lib/{Sabre => }/DAV/Property/IHref.php | 0
lib/{Sabre => }/DAV/Property/LockDiscovery.php | 0
lib/{Sabre => }/DAV/Property/ResourceType.php | 0
lib/{Sabre => }/DAV/Property/Response.php | 2 +
lib/{Sabre => }/DAV/Property/ResponseList.php | 2 +-
lib/{Sabre => }/DAV/Property/SupportedLock.php | 0
lib/DAV/Property/SupportedMethodSet.php | 68 +
.../DAV/Property/SupportedReportSet.php | 0
lib/{Sabre => }/DAV/PropertyInterface.php | 0
.../PropertyStorage/Backend/BackendInterface.php | 61 +
lib/DAV/PropertyStorage/Backend/PDO.php | 145 +
lib/DAV/PropertyStorage/Plugin.php | 126 +
lib/{Sabre => }/DAV/Server.php | 247 +-
lib/{Sabre => }/DAV/ServerPlugin.php | 10 +-
lib/{Sabre => }/DAV/SimpleCollection.php | 0
lib/{Sabre => }/DAV/SimpleFile.php | 0
lib/{Sabre => }/DAV/StringUtil.php | 0
lib/{Sabre => }/DAV/Sync/ISyncCollection.php | 0
lib/{Sabre => }/DAV/Sync/Plugin.php | 28 +-
lib/{Sabre => }/DAV/TemporaryFileFilterPlugin.php | 0
lib/{Sabre => }/DAV/Tree.php | 0
lib/{Sabre => }/DAV/Tree/Filesystem.php | 0
lib/{Sabre => }/DAV/URLUtil.php | 0
lib/{Sabre => }/DAV/UUIDUtil.php | 0
lib/{Sabre => }/DAV/Version.php | 2 +-
lib/{Sabre => }/DAV/XMLUtil.php | 0
.../DAVACL/AbstractPrincipalCollection.php | 0
lib/{Sabre => }/DAVACL/Exception/AceConflict.php | 0
.../DAVACL/Exception/NeedPrivileges.php | 0
lib/{Sabre => }/DAVACL/Exception/NoAbstract.php | 0
.../DAVACL/Exception/NotRecognizedPrincipal.php | 0
.../DAVACL/Exception/NotSupportedPrivilege.php | 0
lib/{Sabre => }/DAVACL/IACL.php | 0
lib/{Sabre => }/DAVACL/IPrincipal.php | 0
lib/{Sabre => }/DAVACL/IPrincipalCollection.php | 0
lib/{Sabre => }/DAVACL/Plugin.php | 199 +-
lib/{Sabre => }/DAVACL/Principal.php | 0
.../DAVACL/PrincipalBackend/AbstractBackend.php | 0
.../DAVACL/PrincipalBackend/BackendInterface.php | 0
lib/{Sabre => }/DAVACL/PrincipalBackend/PDO.php | 0
lib/{Sabre => }/DAVACL/PrincipalCollection.php | 0
lib/{Sabre => }/DAVACL/Property/Acl.php | 0
.../DAVACL/Property/AclRestrictions.php | 0
.../DAVACL/Property/CurrentUserPrivilegeSet.php | 11 +
lib/{Sabre => }/DAVACL/Property/Principal.php | 0
.../DAVACL/Property/SupportedPrivilegeSet.php | 0
lib/Sabre/DAV/Browser/Plugin.php | 511 -
lib/Sabre/DAV/Browser/assets/icons/addressbook.png | Bin 7232 -> 0 bytes
lib/Sabre/DAV/Browser/assets/icons/calendar.png | Bin 4388 -> 0 bytes
lib/Sabre/DAV/Browser/assets/icons/card.png | Bin 5695 -> 0 bytes
lib/Sabre/DAV/Browser/assets/icons/collection.png | Bin 3474 -> 0 bytes
lib/Sabre/DAV/Browser/assets/icons/file.png | Bin 2837 -> 0 bytes
lib/Sabre/DAV/Browser/assets/icons/parent.png | Bin 3474 -> 0 bytes
lib/Sabre/DAV/Browser/assets/icons/principal.png | Bin 5480 -> 0 bytes
lib/Sabre/autoload.php | 25 -
tests/Sabre/CalDAV/Backend/AbstractPDOTest.php | 2 +-
tests/Sabre/CalDAV/Backend/Mock.php | 2 +-
tests/Sabre/CalDAV/CalendarObjectTest.php | 36 +
tests/Sabre/CalDAV/CalendarQueryValidatorTest.php | 14 +
tests/Sabre/CalDAV/ICSExportPluginTest.php | 6 +-
tests/Sabre/CalDAV/JCalTransformTest.php | 253 +
tests/Sabre/CalDAV/PluginTest.php | 18 +-
.../Subscriptions/CreateSubscriptionTest.php | 123 +
tests/Sabre/CalDAV/Subscriptions/PluginTest.php | 15 +
tests/Sabre/CardDAV/Backend/AbstractPDOTest.php | 7 +-
tests/Sabre/CardDAV/SogoStripContentTypeTest.php | 13 +
tests/Sabre/DAV/Browser/GuessContentTypeTest.php | 2 +-
tests/Sabre/DAV/Browser/PluginTest.php | 61 +-
tests/Sabre/DAV/ClientMock.php | 23 +-
tests/Sabre/DAV/ClientTest.php | 234 +
tests/Sabre/DAV/FSExt/FileTest.php | 8 +-
tests/Sabre/DAV/FSExt/ServerTest.php | 12 +-
tests/Sabre/DAV/Mount/PluginTest.php | 2 +-
tests/Sabre/DAV/PartialUpdate/PluginTest.php | 4 +-
.../Sabre/DAV/PartialUpdate/SpecificationTest.php | 89 +
tests/Sabre/DAV/PropFindTest.php | 65 +
.../Sabre/DAV/Property/SupportedMethodSetTest.php | 56 +
.../Sabre/DAV/Property/SupportedReportSetTest.php | 22 +-
.../PropertyStorage/Backend/AbstractPDOTest.php | 130 +
tests/Sabre/DAV/PropertyStorage/Backend/Mock.php | 114 +
.../DAV/PropertyStorage/Backend/PDOMysqlTest.php | 31 +
.../DAV/PropertyStorage/Backend/PDOSqliteTest.php | 37 +
tests/Sabre/DAV/PropertyStorage/PluginTest.php | 58 +
tests/Sabre/DAV/ServerMKCOLTest.php | 4 -
tests/Sabre/DAV/ServerPreconditionTest.php | 9 +-
tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php | 23 +-
tests/Sabre/DAV/ServerPropsTest.php | 48 +-
tests/Sabre/DAV/ServerSimpleTest.php | 34 +-
tests/Sabre/DAV/Sync/PluginTest.php | 20 +-
tests/Sabre/DAV/TreeTest.php | 12 +
tests/Sabre/DAVACL/AllowAccessTest.php | 37 -
tests/Sabre/DAVACL/BlockAccessTest.php | 36 +-
tests/Sabre/DAVACL/PluginPropertiesTest.php | 300 +-
tests/Sabre/DAVServerTest.php | 21 +-
tests/Sabre/TestUtil.php | 7 +
tests/bootstrap.php | 11 +-
298 files changed, 5607 insertions(+), 116763 deletions(-)
diff --cc bin/migrateto21.php
index 0000000,0000000..95a211b
new file mode 100755
--- /dev/null
+++ b/bin/migrateto21.php
@@@ -1,0 -1,0 +1,146 @@@
++#!/usr/bin/env php
++<?php
++
++echo "SabreDAV migrate script for version 2.1\n";
++
++if ($argc<2) {
++
++ echo <<<HELLO
++
++This script help you migrate from a pre-2.1 database to 2.1 and later
++
++If you don't use the default PDO CalDAV or CardDAV backend, it's pointless to
++run this script.
++
++Keep in mind that ALTER TABLE commands will be executed. If you have a large
++dataset this may mean that this process takes a while.
++
++Lastly: Make a back-up first. This script has been tested, but the amount of
++potential variants are extremely high, so it's impossible to deal with every
++possible situation.
++
++In the worst case, you will lose all your data. This is not an overstatement.
++
++Usage:
++
++php {$argv[0]} [pdo-dsn] [username] [password]
++
++For example:
++
++php {$argv[0]} "mysql:host=localhost;dbname=sabredav" root password
++php {$argv[0]} sqlite:data/sabredav.db
++
++HELLO;
++
++ exit();
++
++}
++
++// There's a bunch of places where the autoloader could be, so we'll try all of
++// them.
++$paths = [
++ __DIR__ . '/../vendor/autoload.php',
++ __DIR__ . '/../../../autoload.php',
++];
++
++foreach($paths as $path) {
++ if (file_exists($path)) {
++ include $path;
++ break;
++ }
++}
++
++$dsn = $argv[1];
++$user = isset($argv[2])?$argv[2]:null;
++$pass = isset($argv[3])?$argv[3]:null;
++
++echo "Connecting to database: " . $dsn . "\n";
++
++$pdo = new PDO($dsn, $user, $pass);
++$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
++$pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
++
++$driver = $pdo->getAttribute(PDO::ATTR_DRIVER_NAME);
++
++switch($driver) {
++
++ case 'mysql' :
++ echo "Detected MySQL.\n";
++ break;
++ case 'sqlite' :
++ echo "Detected SQLite.\n";
++ break;
++ default :
++ echo "Error: unsupported driver: " . $driver . "\n";
++ die(-1);
++}
++
++echo "Upgrading 'calendarobjects'\n";
++$addUid = false;
++try {
++ $result = $pdo->query('SELECT * FROM calendarobjects LIMIT 1');
++ $row = $result->fetch(\PDO::FETCH_ASSOC);
++
++ if (!$row) {
++ echo "No data in table. Going to try to add the uid field anyway.\n";
++ $addUid = true;
++ } elseif (array_key_exists('uid', $row)) {
++ echo "uid field eixsts. Assuming that this part of the migration has\n";
++ echo "Already been completed.\n";
++ } else {
++ echo "1.8 schema detected.\n";
++ $addUid = true;
++ }
++
++} catch (Exception $e) {
++ echo "Could not find a calendarobjects table. Skipping this part of the\n";
++ echo "upgrade.\n";
++}
++
++if ($addUid) {
++
++ switch($driver) {
++ case 'mysql' :
++ $pdo->exec('ALTER TABLE calendarobjects ADD uid VARCHAR(200)');
++ break;
++ case 'sqlite' :
++ $pdo->exec('ALTER TABLE calendarobjects ADD uid TEXT');
++ break;
++ }
++
++ $result = $pdo->query('SELECT id, calendardata FROM calendarobjects');
++ $stmt = $pdo->query('UPDATE calendarobjects SET uid = ? WHERE id = ?');
++ $counter = 0;
++
++ while($row = $result->fetch(\PDO::FETCH_ASSOC)) {
++
++ yoyo:
++
++ try {
++ $vobj = \Sabre\VObject\Reader::read($row['calendardata']);
++ } catch (\Exception $e) {
++ echo "Warning! Item with id $row[id] could not be parsed!\n";
++ goto yoyo;
++ }
++ $uid = null;
++ foreach($vobj->select() as $item) {
++ if ($item instanceof \Sabre\VObject\Component) {
++ if ($item->name === 'VTIMEZONE') {
++ continue;
++ }
++ if (!isset($item->UID)) {
++ echo "Warning! Item with id $item[id] does NOT have a UID property and this is required.\n";
++ goto yoyo;
++ }
++ $uid = (string)$uid;
++
++ }
++ }
++ $stmt->exec(array($uid, $row['id']));
++ $counter++;
++
++ }
++
++}
++
++echo "Upgrade to 2.1 schema completed.\n";
diff --cc examples/sql/mysql.calendars.sql
index 9e27df1,fc758e6..ad8c710
mode 100755,100644..100755
--- a/examples/sql/mysql.calendars.sql
+++ b/examples/sql/mysql.calendars.sql
@@@ -1,15 -1,14 +1,15 @@@
CREATE TABLE calendarobjects (
id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
calendardata MEDIUMBLOB,
- uri VARCHAR(200),
- calendarid INT(11) UNSIGNED NOT NULL,
+ uri VARBINARY(200),
+ calendarid INTEGER UNSIGNED NOT NULL,
lastmodified INT(11) UNSIGNED,
- etag VARCHAR(32),
+ etag VARBINARY(32),
size INT(11) UNSIGNED NOT NULL,
- componenttype VARCHAR(8),
+ componenttype VARBINARY(8),
firstoccurence INT(11) UNSIGNED,
lastoccurence INT(11) UNSIGNED,
+ uid VARCHAR(200),
UNIQUE(calendarid, uri)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
diff --cc lib/CalDAV/Backend/PDO.php
index 5e2ca84,8cb3b4d..05edbc6
mode 100755,100644..100755
--- a/lib/CalDAV/Backend/PDO.php
+++ b/lib/CalDAV/Backend/PDO.php
diff --cc lib/CalDAV/Plugin.php
index 59ceb71,30f79bb..b1b6576
--- a/lib/CalDAV/Plugin.php
+++ b/lib/CalDAV/Plugin.php
@@@ -160,9 -187,10 +160,9 @@@ class Plugin extends DAV\ServerPlugin
$this->server = $server;
$server->on('method:MKCALENDAR', [$this,'httpMkcalendar']);
- $server->on('method:POST', [$this,'httpPost']);
$server->on('method:GET', [$this,'httpGet'], 90);
$server->on('report', [$this,'report']);
- $server->on('beforeGetProperties', [$this,'beforeGetProperties']);
+ $server->on('propFind', [$this,'propFind']);
$server->on('onHTMLActionsPanel', [$this,'htmlActionsPanel']);
$server->on('onBrowserPostAction', [$this,'browserPostAction']);
$server->on('beforeWriteContent', [$this,'beforeWriteContent']);
@@@ -298,17 -372,31 +306,13 @@@
$principalUrl = $node->getPrincipalUrl();
- // calendar-home-set property
- $calHome = '{' . self::NS_CALDAV . '}calendar-home-set';
- if (in_array($calHome,$requestedProperties)) {
+ $propFind->handle('{' . self::NS_CALDAV . '}calendar-home-set', function() use ($principalUrl) {
$calendarHomePath = $this->getCalendarHomeForPrincipal($principalUrl) . '/';
+ return new DAV\Property\Href($calendarHomePath);
- unset($requestedProperties[array_search($calHome, $requestedProperties)]);
- $returnedProperties[200][$calHome] = new DAV\Property\Href($calendarHomePath);
-
- }
+ });
- // schedule-outbox-URL property
- $propFind->handle('{' . self::NS_CALDAV . '}schedule-outbox-URL', function() use ($principalUrl) {
-
- $calendarHomePath = $this->getCalendarHomeForPrincipal($principalUrl);
- $outboxPath = $calendarHomePath . '/outbox';
- return new DAV\Property\Href($outboxPath);
-
- });
-
- // calendar-user-address-set property
- $propFind->handle('{' . self::NS_CALDAV . '}calendar-user-address-set', function() use ($node, $principalUrl) {
-
- $addresses = $node->getAlternateUriSet();
- $addresses[] = $this->server->getBaseUri() . DAV\URLUtil::encodePath($principalUrl . '/');
- return new DAV\Property\HrefList($addresses, false);
-
- });
-
// These two properties are shortcuts for ical to easily find
// other principals this principal has access to.
$propRead = '{' . self::NS_CALENDARSERVER . '}calendar-proxy-read-for';
diff --cc tests/Sabre/DAVServerTest.php
index c9c14b6,9fcc773..0cf567c
--- a/tests/Sabre/DAVServerTest.php
+++ b/tests/Sabre/DAVServerTest.php
@@@ -37,7 -23,7 +23,8 @@@ abstract class DAVServerTest extends \P
protected $setupCardDAV = false;
protected $setupACL = false;
protected $setupCalDAVSharing = false;
+ protected $setupCalDAVScheduling = false;
+ protected $setupCalDAVSubscriptions = false;
protected $caldavCalendars = array();
protected $caldavCalendarObjects = array();
@@@ -110,10 -89,9 +97,13 @@@
$this->caldavSharingPlugin = new CalDAV\SharingPlugin();
$this->server->addPlugin($this->caldavSharingPlugin);
}
+ if ($this->setupCalDAVScheduling) {
+ $this->caldavSchedulePlugin = new CalDAV\Schedule\Plugin();
+ $this->server->addPlugin($this->caldavSchedulePlugin);
+ }
+ if ($this->setupCalDAVSubscriptions) {
+ $this->server->addPlugin(new CalDAV\Subscriptions\Plugin());
+ }
if ($this->setupCardDAV) {
$this->carddavPlugin = new CardDAV\Plugin();
$this->server->addPlugin($this->carddavPlugin);
@@@ -184,12 -162,11 +174,15 @@@
function setUpBackends() {
+ if ($this->setupCalDAVSubscriptions && is_null($this->caldavBackend)) {
+ $this->caldavBackend = new CalDAV\Backend\MockSubscriptionSupport($this->caldavCalendars, $this->caldavCalendarObjects);
+ }
if ($this->setupCalDAV && is_null($this->caldavBackend)) {
- $this->caldavBackend = new CalDAV\Backend\Mock($this->caldavCalendars, $this->caldavCalendarObjects);
+ if ($this->setupCalDAVScheduling) {
+ $this->caldavBackend = new CalDAV\Backend\MockScheduling($this->caldavCalendars, $this->caldavCalendarObjects);
+ } else {
+ $this->caldavBackend = new CalDAV\Backend\Mock($this->caldavCalendars, $this->caldavCalendarObjects);
+ }
}
if ($this->setupCardDAV && is_null($this->carddavBackend)) {
$this->carddavBackend = new CardDAV\Backend\Mock($this->carddavAddressBooks, $this->carddavCards);
--
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