diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-07-20 17:20:14 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-07-20 17:20:14 +0200 |
commit | fdb167a0460e1747f803c47755f8148a25feffd8 (patch) | |
tree | 414435552837d0dffe975cfea38cac9c2861bade | |
parent | bf9b6e9ccc6b2677247aa0a8348337248e7cd25e (diff) | |
parent | ecf8e77dabc5b3e4e0215134a4cd083296aedbd7 (diff) | |
download | nextcloud-server-fdb167a0460e1747f803c47755f8148a25feffd8.tar.gz nextcloud-server-fdb167a0460e1747f803c47755f8148a25feffd8.zip |
Merge branch 'master' into subadmin
206 files changed, 376 insertions, 147 deletions
diff --git a/3rdparty/Sabre.includes.php b/3rdparty/Sabre.includes.php index c1334373663..c1334373663 100644..100755 --- a/3rdparty/Sabre.includes.php +++ b/3rdparty/Sabre.includes.php diff --git a/3rdparty/Sabre/CalDAV/Backend/Abstract.php b/3rdparty/Sabre/CalDAV/Backend/Abstract.php index 7aba1d69ffe..7aba1d69ffe 100644..100755 --- a/3rdparty/Sabre/CalDAV/Backend/Abstract.php +++ b/3rdparty/Sabre/CalDAV/Backend/Abstract.php diff --git a/3rdparty/Sabre/CalDAV/Backend/PDO.php b/3rdparty/Sabre/CalDAV/Backend/PDO.php index ddacf940c74..ddacf940c74 100644..100755 --- a/3rdparty/Sabre/CalDAV/Backend/PDO.php +++ b/3rdparty/Sabre/CalDAV/Backend/PDO.php diff --git a/3rdparty/Sabre/CalDAV/Calendar.php b/3rdparty/Sabre/CalDAV/Calendar.php index 623df2dd1b8..623df2dd1b8 100644..100755 --- a/3rdparty/Sabre/CalDAV/Calendar.php +++ b/3rdparty/Sabre/CalDAV/Calendar.php diff --git a/3rdparty/Sabre/CalDAV/CalendarObject.php b/3rdparty/Sabre/CalDAV/CalendarObject.php index 72f0a578d16..72f0a578d16 100644..100755 --- a/3rdparty/Sabre/CalDAV/CalendarObject.php +++ b/3rdparty/Sabre/CalDAV/CalendarObject.php diff --git a/3rdparty/Sabre/CalDAV/CalendarQueryParser.php b/3rdparty/Sabre/CalDAV/CalendarQueryParser.php index bd0d343382f..bd0d343382f 100644..100755 --- a/3rdparty/Sabre/CalDAV/CalendarQueryParser.php +++ b/3rdparty/Sabre/CalDAV/CalendarQueryParser.php diff --git a/3rdparty/Sabre/CalDAV/CalendarQueryValidator.php b/3rdparty/Sabre/CalDAV/CalendarQueryValidator.php index 1bb6b5d53fa..4bcd32cdf88 100644..100755 --- a/3rdparty/Sabre/CalDAV/CalendarQueryValidator.php +++ b/3rdparty/Sabre/CalDAV/CalendarQueryValidator.php @@ -294,6 +294,7 @@ class Sabre_CalDAV_CalendarQueryValidator { // in the VALARM component code, so this is a hack, and an // expensive one too. if ($component->parent->name === 'VEVENT' && $component->parent->RRULE) { + // Fire up the iterator! $it = new Sabre_VObject_RecurrenceIterator($component->parent->parent, (string)$component->parent->UID); while($it->valid()) { @@ -304,14 +305,35 @@ class Sabre_CalDAV_CalendarQueryValidator { // determine if we can 'give up' expanding events. $firstAlarm = null; foreach($expandedEvent->VALARM as $expandedAlarm) { + $effectiveTrigger = $expandedAlarm->getEffectiveTriggerTime(); - if (!$firstAlarm || $effectiveTrigger < $firstAlarm) { - $firstAlarm = $effectiveTrigger; - } if ($expandedAlarm->isInTimeRange($start, $end)) { return true; } + if ((string)$expandedAlarm->TRIGGER['VALUE'] === 'DATE-TIME') { + // This is an alarm with a non-relative trigger + // time, likely created by a buggy client. The + // implication is that every alarm in this + // recurring event trigger at the exact same + // time. It doesn't make sense to traverse + // further. + } else { + // We store the first alarm as a means to + // figure out when we can stop traversing. + if (!$firstAlarm || $effectiveTrigger < $firstAlarm) { + $firstAlarm = $effectiveTrigger; + } + } + + } + if (is_null($firstAlarm)) { + // No alarm was found. + // + // Or technically: No alarm that will change for + // every instance of the recurrence was found, + // which means we can assume there was no match. + return false; } if ($firstAlarm > $end) { return false; diff --git a/3rdparty/Sabre/CalDAV/CalendarRootNode.php b/3rdparty/Sabre/CalDAV/CalendarRootNode.php index 3907913cc78..3907913cc78 100644..100755 --- a/3rdparty/Sabre/CalDAV/CalendarRootNode.php +++ b/3rdparty/Sabre/CalDAV/CalendarRootNode.php diff --git a/3rdparty/Sabre/CalDAV/ICSExportPlugin.php b/3rdparty/Sabre/CalDAV/ICSExportPlugin.php index ec42b406b2f..ec42b406b2f 100644..100755 --- a/3rdparty/Sabre/CalDAV/ICSExportPlugin.php +++ b/3rdparty/Sabre/CalDAV/ICSExportPlugin.php diff --git a/3rdparty/Sabre/CalDAV/ICalendar.php b/3rdparty/Sabre/CalDAV/ICalendar.php index 15d51ebcf79..15d51ebcf79 100644..100755 --- a/3rdparty/Sabre/CalDAV/ICalendar.php +++ b/3rdparty/Sabre/CalDAV/ICalendar.php diff --git a/3rdparty/Sabre/CalDAV/ICalendarObject.php b/3rdparty/Sabre/CalDAV/ICalendarObject.php index 280f982a310..280f982a310 100644..100755 --- a/3rdparty/Sabre/CalDAV/ICalendarObject.php +++ b/3rdparty/Sabre/CalDAV/ICalendarObject.php diff --git a/3rdparty/Sabre/CalDAV/Plugin.php b/3rdparty/Sabre/CalDAV/Plugin.php index d7d1d970518..5903968c003 100644..100755 --- a/3rdparty/Sabre/CalDAV/Plugin.php +++ b/3rdparty/Sabre/CalDAV/Plugin.php @@ -672,6 +672,42 @@ class Sabre_CalDAV_Plugin extends Sabre_DAV_ServerPlugin { } + if ($vobj->name !== 'VCALENDAR') { + throw new Sabre_DAV_Exception_UnsupportedMediaType('This collection can only support iCalendar objects.'); + } + + $foundType = null; + $foundUID = null; + foreach($vobj->getComponents() as $component) { + switch($component->name) { + case 'VTIMEZONE' : + continue 2; + case 'VEVENT' : + case 'VTODO' : + case 'VJOURNAL' : + if (is_null($foundType)) { + $foundType = $component->name; + if (!isset($component->UID)) { + throw new Sabre_DAV_Exception_BadRequest('Every ' . $component->name . ' component must have an UID'); + } + $foundUID = (string)$component->UID; + } else { + if ($foundType !== $component->name) { + throw new Sabre_DAV_Exception_BadRequest('A calendar object must only contain 1 component. We found a ' . $component->name . ' as well as a ' . $foundType); + } + if ($foundUID !== (string)$component->UID) { + throw new Sabre_DAV_Exception_BadRequest('Every ' . $component->name . ' in this object must have identical UIDs'); + } + } + break; + default : + throw new Sabre_DAV_Exception_BadRequest('You are not allowed to create components of type: ' . $component->name . ' here'); + + } + } + if (!$foundType) + throw new Sabre_DAV_Exception_BadRequest('iCalendar object must contain at least 1 of VEVENT, VTODO or VJOURNAL'); + } /** diff --git a/3rdparty/Sabre/CalDAV/Principal/Collection.php b/3rdparty/Sabre/CalDAV/Principal/Collection.php index abbefa5567a..abbefa5567a 100644..100755 --- a/3rdparty/Sabre/CalDAV/Principal/Collection.php +++ b/3rdparty/Sabre/CalDAV/Principal/Collection.php diff --git a/3rdparty/Sabre/CalDAV/Principal/ProxyRead.php b/3rdparty/Sabre/CalDAV/Principal/ProxyRead.php index 4b3f035634a..4b3f035634a 100644..100755 --- a/3rdparty/Sabre/CalDAV/Principal/ProxyRead.php +++ b/3rdparty/Sabre/CalDAV/Principal/ProxyRead.php diff --git a/3rdparty/Sabre/CalDAV/Principal/ProxyWrite.php b/3rdparty/Sabre/CalDAV/Principal/ProxyWrite.php index dd0c2e86edd..dd0c2e86edd 100644..100755 --- a/3rdparty/Sabre/CalDAV/Principal/ProxyWrite.php +++ b/3rdparty/Sabre/CalDAV/Principal/ProxyWrite.php diff --git a/3rdparty/Sabre/CalDAV/Principal/User.php b/3rdparty/Sabre/CalDAV/Principal/User.php index 8453b877a73..8453b877a73 100644..100755 --- a/3rdparty/Sabre/CalDAV/Principal/User.php +++ b/3rdparty/Sabre/CalDAV/Principal/User.php diff --git a/3rdparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php b/3rdparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php index 2ea078d7dac..2ea078d7dac 100644..100755 --- a/3rdparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php +++ b/3rdparty/Sabre/CalDAV/Property/SupportedCalendarComponentSet.php diff --git a/3rdparty/Sabre/CalDAV/Property/SupportedCalendarData.php b/3rdparty/Sabre/CalDAV/Property/SupportedCalendarData.php index 1d848dd5cf6..1d848dd5cf6 100644..100755 --- a/3rdparty/Sabre/CalDAV/Property/SupportedCalendarData.php +++ b/3rdparty/Sabre/CalDAV/Property/SupportedCalendarData.php diff --git a/3rdparty/Sabre/CalDAV/Property/SupportedCollationSet.php b/3rdparty/Sabre/CalDAV/Property/SupportedCollationSet.php index 24e84d4c17d..24e84d4c17d 100644..100755 --- a/3rdparty/Sabre/CalDAV/Property/SupportedCollationSet.php +++ b/3rdparty/Sabre/CalDAV/Property/SupportedCollationSet.php diff --git a/3rdparty/Sabre/CalDAV/Schedule/IMip.php b/3rdparty/Sabre/CalDAV/Schedule/IMip.php index 37e75fcc4a7..37e75fcc4a7 100644..100755 --- a/3rdparty/Sabre/CalDAV/Schedule/IMip.php +++ b/3rdparty/Sabre/CalDAV/Schedule/IMip.php diff --git a/3rdparty/Sabre/CalDAV/Schedule/IOutbox.php b/3rdparty/Sabre/CalDAV/Schedule/IOutbox.php index 46d77514bc0..46d77514bc0 100644..100755 --- a/3rdparty/Sabre/CalDAV/Schedule/IOutbox.php +++ b/3rdparty/Sabre/CalDAV/Schedule/IOutbox.php diff --git a/3rdparty/Sabre/CalDAV/Schedule/Outbox.php b/3rdparty/Sabre/CalDAV/Schedule/Outbox.php index 014c37230d1..014c37230d1 100644..100755 --- a/3rdparty/Sabre/CalDAV/Schedule/Outbox.php +++ b/3rdparty/Sabre/CalDAV/Schedule/Outbox.php diff --git a/3rdparty/Sabre/CalDAV/Server.php b/3rdparty/Sabre/CalDAV/Server.php index 325e3d80a7f..325e3d80a7f 100644..100755 --- a/3rdparty/Sabre/CalDAV/Server.php +++ b/3rdparty/Sabre/CalDAV/Server.php diff --git a/3rdparty/Sabre/CalDAV/UserCalendars.php b/3rdparty/Sabre/CalDAV/UserCalendars.php index b8d3f0573fa..b8d3f0573fa 100644..100755 --- a/3rdparty/Sabre/CalDAV/UserCalendars.php +++ b/3rdparty/Sabre/CalDAV/UserCalendars.php diff --git a/3rdparty/Sabre/CalDAV/Version.php b/3rdparty/Sabre/CalDAV/Version.php index 939e903c89f..289a0c83a34 100644..100755 --- a/3rdparty/Sabre/CalDAV/Version.php +++ b/3rdparty/Sabre/CalDAV/Version.php @@ -14,7 +14,7 @@ class Sabre_CalDAV_Version { /** * Full version number */ - const VERSION = '1.6.2'; + const VERSION = '1.6.3'; /** * Stability : alpha, beta, stable diff --git a/3rdparty/Sabre/CalDAV/includes.php b/3rdparty/Sabre/CalDAV/includes.php index 1ecb870a0e1..1ecb870a0e1 100644..100755 --- a/3rdparty/Sabre/CalDAV/includes.php +++ b/3rdparty/Sabre/CalDAV/includes.php diff --git a/3rdparty/Sabre/CardDAV/AddressBook.php b/3rdparty/Sabre/CardDAV/AddressBook.php index 3b381e1eea3..12297175a85 100644..100755 --- a/3rdparty/Sabre/CardDAV/AddressBook.php +++ b/3rdparty/Sabre/CardDAV/AddressBook.php @@ -108,7 +108,9 @@ class Sabre_CardDAV_AddressBook extends Sabre_DAV_Collection implements Sabre_Ca */ public function createFile($name,$vcardData = null) { - $vcardData = stream_get_contents($vcardData); + if (is_resource($vcardData)) { + $vcardData = stream_get_contents($vcardData); + } // Converting to UTF-8, if needed $vcardData = Sabre_DAV_StringUtil::ensureUTF8($vcardData); diff --git a/3rdparty/Sabre/CardDAV/AddressBookQueryParser.php b/3rdparty/Sabre/CardDAV/AddressBookQueryParser.php index 85a4963127b..46bb8ff18dd 100644..100755 --- a/3rdparty/Sabre/CardDAV/AddressBookQueryParser.php +++ b/3rdparty/Sabre/CardDAV/AddressBookQueryParser.php @@ -9,7 +9,7 @@ * @package Sabre * @subpackage CardDAV * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved. - * @author Evert Pot (http://www.rooftopsolutions.nl/) + * @author Evert Pot (http://www.rooftopsolutions.nl/) * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License */ class Sabre_CardDAV_AddressBookQueryParser { @@ -88,12 +88,22 @@ class Sabre_CardDAV_AddressBookQueryParser { if (is_nan($limit)) $limit = null; $filter = $this->xpath->query('/card:addressbook-query/card:filter'); - if ($filter->length !== 1) { + + // According to the CardDAV spec there needs to be exactly 1 filter + // element. However, KDE 4.8.2 contains a bug that will encode 0 filter + // elements, so this is a workaround for that. + // + // See: https://bugs.kde.org/show_bug.cgi?id=300047 + if ($filter->length === 0) { + $test = null; + $filter = null; + } elseif ($filter->length === 1) { + $filter = $filter->item(0); + $test = $this->xpath->evaluate('string(@test)', $filter); + } else { throw new Sabre_DAV_Exception_BadRequest('Only one filter element is allowed'); } - $filter = $filter->item(0); - $test = $this->xpath->evaluate('string(@test)', $filter); if (!$test) $test = self::TEST_ANYOF; if ($test !== self::TEST_ANYOF && $test !== self::TEST_ALLOF) { throw new Sabre_DAV_Exception_BadRequest('The test attribute must either hold "anyof" or "allof"'); diff --git a/3rdparty/Sabre/CardDAV/AddressBookRoot.php b/3rdparty/Sabre/CardDAV/AddressBookRoot.php index 9d37b15f08e..9d37b15f08e 100644..100755 --- a/3rdparty/Sabre/CardDAV/AddressBookRoot.php +++ b/3rdparty/Sabre/CardDAV/AddressBookRoot.php diff --git a/3rdparty/Sabre/CardDAV/Backend/Abstract.php b/3rdparty/Sabre/CardDAV/Backend/Abstract.php index e4806b7161f..e4806b7161f 100644..100755 --- a/3rdparty/Sabre/CardDAV/Backend/Abstract.php +++ b/3rdparty/Sabre/CardDAV/Backend/Abstract.php diff --git a/3rdparty/Sabre/CardDAV/Backend/PDO.php b/3rdparty/Sabre/CardDAV/Backend/PDO.php index 413a77f3bcc..413a77f3bcc 100644..100755 --- a/3rdparty/Sabre/CardDAV/Backend/PDO.php +++ b/3rdparty/Sabre/CardDAV/Backend/PDO.php diff --git a/3rdparty/Sabre/CardDAV/Card.php b/3rdparty/Sabre/CardDAV/Card.php index d7c66333837..d7c66333837 100644..100755 --- a/3rdparty/Sabre/CardDAV/Card.php +++ b/3rdparty/Sabre/CardDAV/Card.php diff --git a/3rdparty/Sabre/CardDAV/IAddressBook.php b/3rdparty/Sabre/CardDAV/IAddressBook.php index 2bc275bcf74..2bc275bcf74 100644..100755 --- a/3rdparty/Sabre/CardDAV/IAddressBook.php +++ b/3rdparty/Sabre/CardDAV/IAddressBook.php diff --git a/3rdparty/Sabre/CardDAV/ICard.php b/3rdparty/Sabre/CardDAV/ICard.php index a17299316c1..a17299316c1 100644..100755 --- a/3rdparty/Sabre/CardDAV/ICard.php +++ b/3rdparty/Sabre/CardDAV/ICard.php diff --git a/3rdparty/Sabre/CardDAV/IDirectory.php b/3rdparty/Sabre/CardDAV/IDirectory.php index 22d4afeb24a..22d4afeb24a 100644..100755 --- a/3rdparty/Sabre/CardDAV/IDirectory.php +++ b/3rdparty/Sabre/CardDAV/IDirectory.php diff --git a/3rdparty/Sabre/CardDAV/Plugin.php b/3rdparty/Sabre/CardDAV/Plugin.php index 9ebec243eb0..ca20e468497 100644..100755 --- a/3rdparty/Sabre/CardDAV/Plugin.php +++ b/3rdparty/Sabre/CardDAV/Plugin.php @@ -52,6 +52,8 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin { $server->subscribeEvent('report', array($this,'report')); $server->subscribeEvent('onHTMLActionsPanel', array($this,'htmlActionsPanel')); $server->subscribeEvent('onBrowserPostAction', array($this,'browserPostAction')); + $server->subscribeEvent('beforeWriteContent', array($this, 'beforeWriteContent')); + $server->subscribeEvent('beforeCreateFile', array($this, 'beforeCreateFile')); /* Namespaces */ $server->xmlNamespaces[self::NS_CARDDAV] = 'card'; @@ -284,6 +286,81 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin { } /** + * This method is triggered before a file gets updated with new content. + * + * This plugin uses this method to ensure that Card nodes receive valid + * vcard data. + * + * @param string $path + * @param Sabre_DAV_IFile $node + * @param resource $data + * @return void + */ + public function beforeWriteContent($path, Sabre_DAV_IFile $node, &$data) { + + if (!$node instanceof Sabre_CardDAV_ICard) + return; + + $this->validateVCard($data); + + } + + /** + * This method is triggered before a new file is created. + * + * This plugin uses this method to ensure that Card nodes receive valid + * vcard data. + * + * @param string $path + * @param resource $data + * @param Sabre_DAV_ICollection $parentNode + * @return void + */ + public function beforeCreateFile($path, &$data, Sabre_DAV_ICollection $parentNode) { + + if (!$parentNode instanceof Sabre_CardDAV_IAddressBook) + return; + + $this->validateVCard($data); + + } + + /** + * Checks if the submitted iCalendar data is in fact, valid. + * + * An exception is thrown if it's not. + * + * @param resource|string $data + * @return void + */ + protected function validateVCard(&$data) { + + // If it's a stream, we convert it to a string first. + if (is_resource($data)) { + $data = stream_get_contents($data); + } + + // Converting the data to unicode, if needed. + $data = Sabre_DAV_StringUtil::ensureUTF8($data); + + try { + + $vobj = Sabre_VObject_Reader::read($data); + + } catch (Sabre_VObject_ParseException $e) { + + throw new Sabre_DAV_Exception_UnsupportedMediaType('This resource only supports valid vcard data. Parse error: ' . $e->getMessage()); + + } + + if ($vobj->name !== 'VCARD') { + throw new Sabre_DAV_Exception_UnsupportedMediaType('This collection can only support vcard objects.'); + } + + } + + + /** * This function handles the addressbook-query REPORT * * This report is used by the client to filter an addressbook based on a @@ -362,6 +439,8 @@ class Sabre_CardDAV_Plugin extends Sabre_DAV_ServerPlugin { $vcard = Sabre_VObject_Reader::read($vcardData); + if (!$filters) return true; + foreach($filters as $filter) { $isDefined = isset($vcard->{$filter['name']}); diff --git a/3rdparty/Sabre/CardDAV/Property/SupportedAddressData.php b/3rdparty/Sabre/CardDAV/Property/SupportedAddressData.php index 36d9306e7aa..36d9306e7aa 100644..100755 --- a/3rdparty/Sabre/CardDAV/Property/SupportedAddressData.php +++ b/3rdparty/Sabre/CardDAV/Property/SupportedAddressData.php diff --git a/3rdparty/Sabre/CardDAV/UserAddressBooks.php b/3rdparty/Sabre/CardDAV/UserAddressBooks.php index 3f11fb11238..3f11fb11238 100644..100755 --- a/3rdparty/Sabre/CardDAV/UserAddressBooks.php +++ b/3rdparty/Sabre/CardDAV/UserAddressBooks.php diff --git a/3rdparty/Sabre/CardDAV/Version.php b/3rdparty/Sabre/CardDAV/Version.php index 811b929e397..d0623f0d3e8 100644..100755 --- a/3rdparty/Sabre/CardDAV/Version.php +++ b/3rdparty/Sabre/CardDAV/Version.php @@ -16,7 +16,7 @@ class Sabre_CardDAV_Version { /** * Full version number */ - const VERSION = '1.6.1'; + const VERSION = '1.6.3'; /** * Stability : alpha, beta, stable diff --git a/3rdparty/Sabre/CardDAV/includes.php b/3rdparty/Sabre/CardDAV/includes.php index c3b8c04b077..c3b8c04b077 100644..100755 --- a/3rdparty/Sabre/CardDAV/includes.php +++ b/3rdparty/Sabre/CardDAV/includes.php diff --git a/3rdparty/Sabre/DAV/Auth/Backend/AbstractBasic.php b/3rdparty/Sabre/DAV/Auth/Backend/AbstractBasic.php index 1e89b84f9a1..1e89b84f9a1 100644..100755 --- a/3rdparty/Sabre/DAV/Auth/Backend/AbstractBasic.php +++ b/3rdparty/Sabre/DAV/Auth/Backend/AbstractBasic.php diff --git a/3rdparty/Sabre/DAV/Auth/Backend/AbstractDigest.php b/3rdparty/Sabre/DAV/Auth/Backend/AbstractDigest.php index 9833928b976..9833928b976 100644..100755 --- a/3rdparty/Sabre/DAV/Auth/Backend/AbstractDigest.php +++ b/3rdparty/Sabre/DAV/Auth/Backend/AbstractDigest.php diff --git a/3rdparty/Sabre/DAV/Auth/Backend/Apache.php b/3rdparty/Sabre/DAV/Auth/Backend/Apache.php index d4294ea4d86..d4294ea4d86 100644..100755 --- a/3rdparty/Sabre/DAV/Auth/Backend/Apache.php +++ b/3rdparty/Sabre/DAV/Auth/Backend/Apache.php diff --git a/3rdparty/Sabre/DAV/Auth/Backend/File.php b/3rdparty/Sabre/DAV/Auth/Backend/File.php index de308d64a67..de308d64a67 100644..100755 --- a/3rdparty/Sabre/DAV/Auth/Backend/File.php +++ b/3rdparty/Sabre/DAV/Auth/Backend/File.php diff --git a/3rdparty/Sabre/DAV/Auth/Backend/PDO.php b/3rdparty/Sabre/DAV/Auth/Backend/PDO.php index eac18a23fbb..eac18a23fbb 100644..100755 --- a/3rdparty/Sabre/DAV/Auth/Backend/PDO.php +++ b/3rdparty/Sabre/DAV/Auth/Backend/PDO.php diff --git a/3rdparty/Sabre/DAV/Auth/IBackend.php b/3rdparty/Sabre/DAV/Auth/IBackend.php index 5be5d1bc93d..5be5d1bc93d 100644..100755 --- a/3rdparty/Sabre/DAV/Auth/IBackend.php +++ b/3rdparty/Sabre/DAV/Auth/IBackend.php diff --git a/3rdparty/Sabre/DAV/Auth/Plugin.php b/3rdparty/Sabre/DAV/Auth/Plugin.php index 55a4e391674..55a4e391674 100644..100755 --- a/3rdparty/Sabre/DAV/Auth/Plugin.php +++ b/3rdparty/Sabre/DAV/Auth/Plugin.php diff --git a/3rdparty/Sabre/DAV/Browser/GuessContentType.php b/3rdparty/Sabre/DAV/Browser/GuessContentType.php index b6c00d461cb..b6c00d461cb 100644..100755 --- a/3rdparty/Sabre/DAV/Browser/GuessContentType.php +++ b/3rdparty/Sabre/DAV/Browser/GuessContentType.php diff --git a/3rdparty/Sabre/DAV/Browser/MapGetToPropFind.php b/3rdparty/Sabre/DAV/Browser/MapGetToPropFind.php index 15884887641..15884887641 100644..100755 --- a/3rdparty/Sabre/DAV/Browser/MapGetToPropFind.php +++ b/3rdparty/Sabre/DAV/Browser/MapGetToPropFind.php diff --git a/3rdparty/Sabre/DAV/Browser/Plugin.php b/3rdparty/Sabre/DAV/Browser/Plugin.php index 09bbdd2ae02..09bbdd2ae02 100644..100755 --- a/3rdparty/Sabre/DAV/Browser/Plugin.php +++ b/3rdparty/Sabre/DAV/Browser/Plugin.php diff --git a/3rdparty/Sabre/DAV/Browser/assets/favicon.ico b/3rdparty/Sabre/DAV/Browser/assets/favicon.ico Binary files differindex 2b2c10a22cc..2b2c10a22cc 100644..100755 --- a/3rdparty/Sabre/DAV/Browser/assets/favicon.ico +++ b/3rdparty/Sabre/DAV/Browser/assets/favicon.ico diff --git a/3rdparty/Sabre/DAV/Browser/assets/icons/addressbook.png b/3rdparty/Sabre/DAV/Browser/assets/icons/addressbook.png Binary files differindex c9acc84172d..c9acc84172d 100644..100755 --- a/3rdparty/Sabre/DAV/Browser/assets/icons/addressbook.png +++ b/3rdparty/Sabre/DAV/Browser/assets/icons/addressbook.png diff --git a/3rdparty/Sabre/DAV/Browser/assets/icons/calendar.png b/3rdparty/Sabre/DAV/Browser/assets/icons/calendar.png Binary files differindex 3ecd6a800a0..3ecd6a800a0 100644..100755 --- a/3rdparty/Sabre/DAV/Browser/assets/icons/calendar.png +++ b/3rdparty/Sabre/DAV/Browser/assets/icons/calendar.png diff --git a/3rdparty/Sabre/DAV/Browser/assets/icons/card.png b/3rdparty/Sabre/DAV/Browser/assets/icons/card.png Binary files differindex 2ce954866d8..2ce954866d8 100644..100755 --- a/3rdparty/Sabre/DAV/Browser/assets/icons/card.png +++ b/3rdparty/Sabre/DAV/Browser/assets/icons/card.png diff --git a/3rdparty/Sabre/DAV/Browser/assets/icons/collection.png b/3rdparty/Sabre/DAV/Browser/assets/icons/collection.png Binary files differindex 156fa64fd50..156fa64fd50 100644..100755 --- a/3rdparty/Sabre/DAV/Browser/assets/icons/collection.png +++ b/3rdparty/Sabre/DAV/Browser/assets/icons/collection.png diff --git a/3rdparty/Sabre/DAV/Browser/assets/icons/file.png b/3rdparty/Sabre/DAV/Browser/assets/icons/file.png Binary files differindex 3b98551cec3..3b98551cec3 100644..100755 --- a/3rdparty/Sabre/DAV/Browser/assets/icons/file.png +++ b/3rdparty/Sabre/DAV/Browser/assets/icons/file.png diff --git a/3rdparty/Sabre/DAV/Browser/assets/icons/parent.png b/3rdparty/Sabre/DAV/Browser/assets/icons/parent.png Binary files differindex 156fa64fd50..156fa64fd50 100644..100755 --- a/3rdparty/Sabre/DAV/Browser/assets/icons/parent.png +++ b/3rdparty/Sabre/DAV/Browser/assets/icons/parent.png diff --git a/3rdparty/Sabre/DAV/Browser/assets/icons/principal.png b/3rdparty/Sabre/DAV/Browser/assets/icons/principal.png Binary files differindex f8988f828e6..f8988f828e6 100644..100755 --- a/3rdparty/Sabre/DAV/Browser/assets/icons/principal.png +++ b/3rdparty/Sabre/DAV/Browser/assets/icons/principal.png diff --git a/3rdparty/Sabre/DAV/Client.php b/3rdparty/Sabre/DAV/Client.php index 075e84caa1d..9a428765e90 100644..100755 --- a/3rdparty/Sabre/DAV/Client.php +++ b/3rdparty/Sabre/DAV/Client.php @@ -11,7 +11,7 @@ * @package Sabre * @subpackage DAVClient * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved. - * @author Evert Pot (http://www.rooftopsolutions.nl/) + * @author Evert Pot (http://www.rooftopsolutions.nl/) * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License */ class Sabre_DAV_Client { @@ -24,6 +24,28 @@ class Sabre_DAV_Client { protected $proxy; /** + * Basic authentication + */ + const AUTH_BASIC = 1; + + /** + * Digest authentication + */ + const AUTH_DIGEST = 2; + + /** + * The authentication type we're using. + * + * This is a bitmask of AUTH_BASIC and AUTH_DIGEST. + * + * If DIGEST is used, the client makes 1 extra request per request, to get + * the authentication tokens. + * + * @var int + */ + protected $authType; + + /** * Constructor * * Settings are provided through the 'settings' argument. The following @@ -46,16 +68,21 @@ class Sabre_DAV_Client { 'baseUri', 'userName', 'password', - 'proxy' + 'proxy', ); - foreach($validSettings as $validSetting) { if (isset($settings[$validSetting])) { $this->$validSetting = $settings[$validSetting]; } } + if (isset($settings['authType'])) { + $this->authType = $settings['authType']; + } else { + $this->authType = self::AUTH_BASIC | self::AUTH_DIGEST; + } + $this->propertyMap['{DAV:}resourcetype'] = 'Sabre_DAV_Property_ResourceType'; } @@ -250,14 +277,9 @@ class Sabre_DAV_Client { // Automatically follow redirects CURLOPT_FOLLOWLOCATION => true, CURLOPT_MAXREDIRS => 5, - CURLOPT_SSL_VERIFYPEER => true, - //CURLOPT_SSL_VERIFYPEER => false, ); switch ($method) { - case 'PUT': - $curlSettings[CURLOPT_PUT] = true; - break; case 'HEAD' : // do not read body with HEAD requests (this is neccessary because cURL does not ignore the body with HEAD @@ -288,8 +310,15 @@ class Sabre_DAV_Client { $curlSettings[CURLOPT_PROXY] = $this->proxy; } - if ($this->userName) { - $curlSettings[CURLOPT_HTTPAUTH] = CURLAUTH_BASIC | CURLAUTH_DIGEST; + if ($this->userName && $this->authType) { + $curlType = 0; + if ($this->authType & self::AUTH_BASIC) { + $curlType |= CURLAUTH_BASIC; + } + if ($this->authType & self::AUTH_DIGEST) { + $curlType |= CURLAUTH_DIGEST; + } + $curlSettings[CURLOPT_HTTPAUTH] = $curlType; $curlSettings[CURLOPT_USERPWD] = $this->userName . ':' . $this->password; } diff --git a/3rdparty/Sabre/DAV/Collection.php b/3rdparty/Sabre/DAV/Collection.php index 776c22531b2..776c22531b2 100644..100755 --- a/3rdparty/Sabre/DAV/Collection.php +++ b/3rdparty/Sabre/DAV/Collection.php diff --git a/3rdparty/Sabre/DAV/Directory.php b/3rdparty/Sabre/DAV/Directory.php index 6db8febc02e..6db8febc02e 100644..100755 --- a/3rdparty/Sabre/DAV/Directory.php +++ b/3rdparty/Sabre/DAV/Directory.php diff --git a/3rdparty/Sabre/DAV/Exception.php b/3rdparty/Sabre/DAV/Exception.php index a2cd6cf5820..a2cd6cf5820 100644..100755 --- a/3rdparty/Sabre/DAV/Exception.php +++ b/3rdparty/Sabre/DAV/Exception.php diff --git a/3rdparty/Sabre/DAV/Exception/BadRequest.php b/3rdparty/Sabre/DAV/Exception/BadRequest.php index b198648a754..b198648a754 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/BadRequest.php +++ b/3rdparty/Sabre/DAV/Exception/BadRequest.php diff --git a/3rdparty/Sabre/DAV/Exception/Conflict.php b/3rdparty/Sabre/DAV/Exception/Conflict.php index 6b0bd1fad73..6b0bd1fad73 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/Conflict.php +++ b/3rdparty/Sabre/DAV/Exception/Conflict.php diff --git a/3rdparty/Sabre/DAV/Exception/ConflictingLock.php b/3rdparty/Sabre/DAV/Exception/ConflictingLock.php index 6121868e69e..6121868e69e 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/ConflictingLock.php +++ b/3rdparty/Sabre/DAV/Exception/ConflictingLock.php diff --git a/3rdparty/Sabre/DAV/Exception/FileNotFound.php b/3rdparty/Sabre/DAV/Exception/FileNotFound.php index d76e400c93b..d76e400c93b 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/FileNotFound.php +++ b/3rdparty/Sabre/DAV/Exception/FileNotFound.php diff --git a/3rdparty/Sabre/DAV/Exception/Forbidden.php b/3rdparty/Sabre/DAV/Exception/Forbidden.php index 20b1056e31b..20b1056e31b 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/Forbidden.php +++ b/3rdparty/Sabre/DAV/Exception/Forbidden.php diff --git a/3rdparty/Sabre/DAV/Exception/InsufficientStorage.php b/3rdparty/Sabre/DAV/Exception/InsufficientStorage.php index 1a15089b0a3..1a15089b0a3 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/InsufficientStorage.php +++ b/3rdparty/Sabre/DAV/Exception/InsufficientStorage.php diff --git a/3rdparty/Sabre/DAV/Exception/InvalidResourceType.php b/3rdparty/Sabre/DAV/Exception/InvalidResourceType.php index 2230f1d0811..2230f1d0811 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/InvalidResourceType.php +++ b/3rdparty/Sabre/DAV/Exception/InvalidResourceType.php diff --git a/3rdparty/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php b/3rdparty/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php index 80ab7aff65a..80ab7aff65a 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php +++ b/3rdparty/Sabre/DAV/Exception/LockTokenMatchesRequestUri.php diff --git a/3rdparty/Sabre/DAV/Exception/Locked.php b/3rdparty/Sabre/DAV/Exception/Locked.php index 976365ac1f8..976365ac1f8 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/Locked.php +++ b/3rdparty/Sabre/DAV/Exception/Locked.php diff --git a/3rdparty/Sabre/DAV/Exception/MethodNotAllowed.php b/3rdparty/Sabre/DAV/Exception/MethodNotAllowed.php index 31875751505..31875751505 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/MethodNotAllowed.php +++ b/3rdparty/Sabre/DAV/Exception/MethodNotAllowed.php diff --git a/3rdparty/Sabre/DAV/Exception/NotAuthenticated.php b/3rdparty/Sabre/DAV/Exception/NotAuthenticated.php index 87ca624429f..87ca624429f 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/NotAuthenticated.php +++ b/3rdparty/Sabre/DAV/Exception/NotAuthenticated.php diff --git a/3rdparty/Sabre/DAV/Exception/NotFound.php b/3rdparty/Sabre/DAV/Exception/NotFound.php index 2b9da560d23..2b9da560d23 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/NotFound.php +++ b/3rdparty/Sabre/DAV/Exception/NotFound.php diff --git a/3rdparty/Sabre/DAV/Exception/NotImplemented.php b/3rdparty/Sabre/DAV/Exception/NotImplemented.php index d017a19f559..d017a19f559 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/NotImplemented.php +++ b/3rdparty/Sabre/DAV/Exception/NotImplemented.php diff --git a/3rdparty/Sabre/DAV/Exception/PaymentRequired.php b/3rdparty/Sabre/DAV/Exception/PaymentRequired.php index 4982f45a4b5..4982f45a4b5 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/PaymentRequired.php +++ b/3rdparty/Sabre/DAV/Exception/PaymentRequired.php diff --git a/3rdparty/Sabre/DAV/Exception/PreconditionFailed.php b/3rdparty/Sabre/DAV/Exception/PreconditionFailed.php index 213e9c52317..213e9c52317 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/PreconditionFailed.php +++ b/3rdparty/Sabre/DAV/Exception/PreconditionFailed.php diff --git a/3rdparty/Sabre/DAV/Exception/ReportNotImplemented.php b/3rdparty/Sabre/DAV/Exception/ReportNotImplemented.php index e86800f3038..e86800f3038 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/ReportNotImplemented.php +++ b/3rdparty/Sabre/DAV/Exception/ReportNotImplemented.php diff --git a/3rdparty/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php b/3rdparty/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php index 29ee3654a7e..29ee3654a7e 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php +++ b/3rdparty/Sabre/DAV/Exception/RequestedRangeNotSatisfiable.php diff --git a/3rdparty/Sabre/DAV/Exception/UnsupportedMediaType.php b/3rdparty/Sabre/DAV/Exception/UnsupportedMediaType.php index 9a4693b21a8..9a4693b21a8 100644..100755 --- a/3rdparty/Sabre/DAV/Exception/UnsupportedMediaType.php +++ b/3rdparty/Sabre/DAV/Exception/UnsupportedMediaType.php diff --git a/3rdparty/Sabre/DAV/FS/Directory.php b/3rdparty/Sabre/DAV/FS/Directory.php index 3af2d755583..3af2d755583 100644..100755 --- a/3rdparty/Sabre/DAV/FS/Directory.php +++ b/3rdparty/Sabre/DAV/FS/Directory.php diff --git a/3rdparty/Sabre/DAV/FS/File.php b/3rdparty/Sabre/DAV/FS/File.php index 6a8039fe303..6a8039fe303 100644..100755 --- a/3rdparty/Sabre/DAV/FS/File.php +++ b/3rdparty/Sabre/DAV/FS/File.php diff --git a/3rdparty/Sabre/DAV/FS/Node.php b/3rdparty/Sabre/DAV/FS/Node.php index 1283e9d0fdc..1283e9d0fdc 100644..100755 --- a/3rdparty/Sabre/DAV/FS/Node.php +++ b/3rdparty/Sabre/DAV/FS/Node.php diff --git a/3rdparty/Sabre/DAV/FSExt/Directory.php b/3rdparty/Sabre/DAV/FSExt/Directory.php index 540057183b3..540057183b3 100644..100755 --- a/3rdparty/Sabre/DAV/FSExt/Directory.php +++ b/3rdparty/Sabre/DAV/FSExt/Directory.php diff --git a/3rdparty/Sabre/DAV/FSExt/File.php b/3rdparty/Sabre/DAV/FSExt/File.php index b93ce5aee21..b93ce5aee21 100644..100755 --- a/3rdparty/Sabre/DAV/FSExt/File.php +++ b/3rdparty/Sabre/DAV/FSExt/File.php diff --git a/3rdparty/Sabre/DAV/FSExt/Node.php b/3rdparty/Sabre/DAV/FSExt/Node.php index 68ca06beb7e..68ca06beb7e 100644..100755 --- a/3rdparty/Sabre/DAV/FSExt/Node.php +++ b/3rdparty/Sabre/DAV/FSExt/Node.php diff --git a/3rdparty/Sabre/DAV/File.php b/3rdparty/Sabre/DAV/File.php index 3126bd8d364..3126bd8d364 100644..100755 --- a/3rdparty/Sabre/DAV/File.php +++ b/3rdparty/Sabre/DAV/File.php diff --git a/3rdparty/Sabre/DAV/ICollection.php b/3rdparty/Sabre/DAV/ICollection.php index 4626038a66e..4626038a66e 100644..100755 --- a/3rdparty/Sabre/DAV/ICollection.php +++ b/3rdparty/Sabre/DAV/ICollection.php diff --git a/3rdparty/Sabre/DAV/IExtendedCollection.php b/3rdparty/Sabre/DAV/IExtendedCollection.php index 6ec345f9a62..6ec345f9a62 100644..100755 --- a/3rdparty/Sabre/DAV/IExtendedCollection.php +++ b/3rdparty/Sabre/DAV/IExtendedCollection.php diff --git a/3rdparty/Sabre/DAV/IFile.php b/3rdparty/Sabre/DAV/IFile.php index 478f822ae71..478f822ae71 100644..100755 --- a/3rdparty/Sabre/DAV/IFile.php +++ b/3rdparty/Sabre/DAV/IFile.php diff --git a/3rdparty/Sabre/DAV/INode.php b/3rdparty/Sabre/DAV/INode.php index c57d3923105..c57d3923105 100644..100755 --- a/3rdparty/Sabre/DAV/INode.php +++ b/3rdparty/Sabre/DAV/INode.php diff --git a/3rdparty/Sabre/DAV/IProperties.php b/3rdparty/Sabre/DAV/IProperties.php index 38eaab16dad..38eaab16dad 100644..100755 --- a/3rdparty/Sabre/DAV/IProperties.php +++ b/3rdparty/Sabre/DAV/IProperties.php diff --git a/3rdparty/Sabre/DAV/IQuota.php b/3rdparty/Sabre/DAV/IQuota.php index 3fe4c4eced4..3fe4c4eced4 100644..100755 --- a/3rdparty/Sabre/DAV/IQuota.php +++ b/3rdparty/Sabre/DAV/IQuota.php diff --git a/3rdparty/Sabre/DAV/Locks/Backend/Abstract.php b/3rdparty/Sabre/DAV/Locks/Backend/Abstract.php index 127e643a2b9..127e643a2b9 100644..100755 --- a/3rdparty/Sabre/DAV/Locks/Backend/Abstract.php +++ b/3rdparty/Sabre/DAV/Locks/Backend/Abstract.php diff --git a/3rdparty/Sabre/DAV/Locks/Backend/FS.php b/3rdparty/Sabre/DAV/Locks/Backend/FS.php index 02cab87fc82..02cab87fc82 100644..100755 --- a/3rdparty/Sabre/DAV/Locks/Backend/FS.php +++ b/3rdparty/Sabre/DAV/Locks/Backend/FS.php diff --git a/3rdparty/Sabre/DAV/Locks/Backend/File.php b/3rdparty/Sabre/DAV/Locks/Backend/File.php index c33f963514b..c33f963514b 100644..100755 --- a/3rdparty/Sabre/DAV/Locks/Backend/File.php +++ b/3rdparty/Sabre/DAV/Locks/Backend/File.php diff --git a/3rdparty/Sabre/DAV/Locks/Backend/PDO.php b/3rdparty/Sabre/DAV/Locks/Backend/PDO.php index acce80638ec..acce80638ec 100644..100755 --- a/3rdparty/Sabre/DAV/Locks/Backend/PDO.php +++ b/3rdparty/Sabre/DAV/Locks/Backend/PDO.php diff --git a/3rdparty/Sabre/DAV/Locks/LockInfo.php b/3rdparty/Sabre/DAV/Locks/LockInfo.php index 9df014a4281..9df014a4281 100644..100755 --- a/3rdparty/Sabre/DAV/Locks/LockInfo.php +++ b/3rdparty/Sabre/DAV/Locks/LockInfo.php diff --git a/3rdparty/Sabre/DAV/Locks/Plugin.php b/3rdparty/Sabre/DAV/Locks/Plugin.php index fd956950b8a..fd956950b8a 100644..100755 --- a/3rdparty/Sabre/DAV/Locks/Plugin.php +++ b/3rdparty/Sabre/DAV/Locks/Plugin.php diff --git a/3rdparty/Sabre/DAV/Mount/Plugin.php b/3rdparty/Sabre/DAV/Mount/Plugin.php index b37a90ae993..b37a90ae993 100644..100755 --- a/3rdparty/Sabre/DAV/Mount/Plugin.php +++ b/3rdparty/Sabre/DAV/Mount/Plugin.php diff --git a/3rdparty/Sabre/DAV/Node.php b/3rdparty/Sabre/DAV/Node.php index 070b7176afd..070b7176afd 100644..100755 --- a/3rdparty/Sabre/DAV/Node.php +++ b/3rdparty/Sabre/DAV/Node.php diff --git a/3rdparty/Sabre/DAV/ObjectTree.php b/3rdparty/Sabre/DAV/ObjectTree.php index bce51463900..bce51463900 100644..100755 --- a/3rdparty/Sabre/DAV/ObjectTree.php +++ b/3rdparty/Sabre/DAV/ObjectTree.php diff --git a/3rdparty/Sabre/DAV/Property.php b/3rdparty/Sabre/DAV/Property.php index 1cfada3236c..1cfada3236c 100644..100755 --- a/3rdparty/Sabre/DAV/Property.php +++ b/3rdparty/Sabre/DAV/Property.php diff --git a/3rdparty/Sabre/DAV/Property/GetLastModified.php b/3rdparty/Sabre/DAV/Property/GetLastModified.php index bd63f573140..bd63f573140 100644..100755 --- a/3rdparty/Sabre/DAV/Property/GetLastModified.php +++ b/3rdparty/Sabre/DAV/Property/GetLastModified.php diff --git a/3rdparty/Sabre/DAV/Property/Href.php b/3rdparty/Sabre/DAV/Property/Href.php index dac564f24d7..dac564f24d7 100644..100755 --- a/3rdparty/Sabre/DAV/Property/Href.php +++ b/3rdparty/Sabre/DAV/Property/Href.php diff --git a/3rdparty/Sabre/DAV/Property/HrefList.php b/3rdparty/Sabre/DAV/Property/HrefList.php index 7a52272e885..7a52272e885 100644..100755 --- a/3rdparty/Sabre/DAV/Property/HrefList.php +++ b/3rdparty/Sabre/DAV/Property/HrefList.php diff --git a/3rdparty/Sabre/DAV/Property/IHref.php b/3rdparty/Sabre/DAV/Property/IHref.php index 5c0409064cb..5c0409064cb 100644..100755 --- a/3rdparty/Sabre/DAV/Property/IHref.php +++ b/3rdparty/Sabre/DAV/Property/IHref.php diff --git a/3rdparty/Sabre/DAV/Property/LockDiscovery.php b/3rdparty/Sabre/DAV/Property/LockDiscovery.php index 2ded5649a44..2ded5649a44 100644..100755 --- a/3rdparty/Sabre/DAV/Property/LockDiscovery.php +++ b/3rdparty/Sabre/DAV/Property/LockDiscovery.php diff --git a/3rdparty/Sabre/DAV/Property/ResourceType.php b/3rdparty/Sabre/DAV/Property/ResourceType.php index f6269611e54..f6269611e54 100644..100755 --- a/3rdparty/Sabre/DAV/Property/ResourceType.php +++ b/3rdparty/Sabre/DAV/Property/ResourceType.php diff --git a/3rdparty/Sabre/DAV/Property/Response.php b/3rdparty/Sabre/DAV/Property/Response.php index 88afbcfb26d..88afbcfb26d 100644..100755 --- a/3rdparty/Sabre/DAV/Property/Response.php +++ b/3rdparty/Sabre/DAV/Property/Response.php diff --git a/3rdparty/Sabre/DAV/Property/ResponseList.php b/3rdparty/Sabre/DAV/Property/ResponseList.php index cae923afbf9..cae923afbf9 100644..100755 --- a/3rdparty/Sabre/DAV/Property/ResponseList.php +++ b/3rdparty/Sabre/DAV/Property/ResponseList.php diff --git a/3rdparty/Sabre/DAV/Property/SupportedLock.php b/3rdparty/Sabre/DAV/Property/SupportedLock.php index 4e3aaf23a1a..4e3aaf23a1a 100644..100755 --- a/3rdparty/Sabre/DAV/Property/SupportedLock.php +++ b/3rdparty/Sabre/DAV/Property/SupportedLock.php diff --git a/3rdparty/Sabre/DAV/Property/SupportedReportSet.php b/3rdparty/Sabre/DAV/Property/SupportedReportSet.php index e62699f3b5a..e62699f3b5a 100644..100755 --- a/3rdparty/Sabre/DAV/Property/SupportedReportSet.php +++ b/3rdparty/Sabre/DAV/Property/SupportedReportSet.php diff --git a/3rdparty/Sabre/DAV/Server.php b/3rdparty/Sabre/DAV/Server.php index 50b190e8fab..0dfac8b0c71 100644..100755 --- a/3rdparty/Sabre/DAV/Server.php +++ b/3rdparty/Sabre/DAV/Server.php @@ -215,7 +215,7 @@ class Sabre_DAV_Server { $DOM->appendChild($error); $error->appendChild($DOM->createElement('s:exception',get_class($e))); - $error->appendChild($DOM->createElement('s:message',htmlentities($e->getMessage()))); + $error->appendChild($DOM->createElement('s:message',$e->getMessage())); if ($this->debugExceptions) { $error->appendChild($DOM->createElement('s:file',$e->getFile())); $error->appendChild($DOM->createElement('s:line',$e->getLine())); @@ -1784,7 +1784,14 @@ class Sabre_DAV_Server { $etag = $node->getETag(); if ($etag===$ifMatchItem) { $haveMatch = true; + } else { + // Evolution has a bug where it sometimes prepends the " + // with a \. This is our workaround. + if (str_replace('\\"','"', $ifMatchItem) === $etag) { + $haveMatch = true; + } } + } if (!$haveMatch) { throw new Sabre_DAV_Exception_PreconditionFailed('An If-Match header was specified, but none of the specified the ETags matched.','If-Match'); diff --git a/3rdparty/Sabre/DAV/ServerPlugin.php b/3rdparty/Sabre/DAV/ServerPlugin.php index 131863d13fb..131863d13fb 100644..100755 --- a/3rdparty/Sabre/DAV/ServerPlugin.php +++ b/3rdparty/Sabre/DAV/ServerPlugin.php diff --git a/3rdparty/Sabre/DAV/SimpleCollection.php b/3rdparty/Sabre/DAV/SimpleCollection.php index 4acf971caa5..4acf971caa5 100644..100755 --- a/3rdparty/Sabre/DAV/SimpleCollection.php +++ b/3rdparty/Sabre/DAV/SimpleCollection.php diff --git a/3rdparty/Sabre/DAV/SimpleDirectory.php b/3rdparty/Sabre/DAV/SimpleDirectory.php index 621222ebc53..621222ebc53 100644..100755 --- a/3rdparty/Sabre/DAV/SimpleDirectory.php +++ b/3rdparty/Sabre/DAV/SimpleDirectory.php diff --git a/3rdparty/Sabre/DAV/SimpleFile.php b/3rdparty/Sabre/DAV/SimpleFile.php index 58330d6861d..58330d6861d 100644..100755 --- a/3rdparty/Sabre/DAV/SimpleFile.php +++ b/3rdparty/Sabre/DAV/SimpleFile.php diff --git a/3rdparty/Sabre/DAV/StringUtil.php b/3rdparty/Sabre/DAV/StringUtil.php index b126a94c825..b126a94c825 100644..100755 --- a/3rdparty/Sabre/DAV/StringUtil.php +++ b/3rdparty/Sabre/DAV/StringUtil.php diff --git a/3rdparty/Sabre/DAV/TemporaryFileFilterPlugin.php b/3rdparty/Sabre/DAV/TemporaryFileFilterPlugin.php index 36096e67775..36096e67775 100644..100755 --- a/3rdparty/Sabre/DAV/TemporaryFileFilterPlugin.php +++ b/3rdparty/Sabre/DAV/TemporaryFileFilterPlugin.php diff --git a/3rdparty/Sabre/DAV/Tree.php b/3rdparty/Sabre/DAV/Tree.php index 50216394155..50216394155 100644..100755 --- a/3rdparty/Sabre/DAV/Tree.php +++ b/3rdparty/Sabre/DAV/Tree.php diff --git a/3rdparty/Sabre/DAV/Tree/Filesystem.php b/3rdparty/Sabre/DAV/Tree/Filesystem.php index 85a9ee317be..40580ae366f 100644..100755 --- a/3rdparty/Sabre/DAV/Tree/Filesystem.php +++ b/3rdparty/Sabre/DAV/Tree/Filesystem.php @@ -42,9 +42,9 @@ class Sabre_DAV_Tree_Filesystem extends Sabre_DAV_Tree { $realPath = $this->getRealPath($path); if (!file_exists($realPath)) throw new Sabre_DAV_Exception_NotFound('File at location ' . $realPath . ' not found'); if (is_dir($realPath)) { - return new Sabre_DAV_FS_Directory($path); + return new Sabre_DAV_FS_Directory($realPath); } else { - return new Sabre_DAV_FS_File($path); + return new Sabre_DAV_FS_File($realPath); } } diff --git a/3rdparty/Sabre/DAV/URLUtil.php b/3rdparty/Sabre/DAV/URLUtil.php index 794665a44f6..794665a44f6 100644..100755 --- a/3rdparty/Sabre/DAV/URLUtil.php +++ b/3rdparty/Sabre/DAV/URLUtil.php diff --git a/3rdparty/Sabre/DAV/UUIDUtil.php b/3rdparty/Sabre/DAV/UUIDUtil.php index f0eebe598e5..f0eebe598e5 100644..100755 --- a/3rdparty/Sabre/DAV/UUIDUtil.php +++ b/3rdparty/Sabre/DAV/UUIDUtil.php diff --git a/3rdparty/Sabre/DAV/Version.php b/3rdparty/Sabre/DAV/Version.php index 5e5d15e4039..40cfe81b34f 100644..100755 --- a/3rdparty/Sabre/DAV/Version.php +++ b/3rdparty/Sabre/DAV/Version.php @@ -14,7 +14,7 @@ class Sabre_DAV_Version { /** * Full version number */ - const VERSION = '1.6.2'; + const VERSION = '1.6.3'; /** * Stability : alpha, beta, stable diff --git a/3rdparty/Sabre/DAV/XMLUtil.php b/3rdparty/Sabre/DAV/XMLUtil.php index 60eff3b159a..60eff3b159a 100644..100755 --- a/3rdparty/Sabre/DAV/XMLUtil.php +++ b/3rdparty/Sabre/DAV/XMLUtil.php diff --git a/3rdparty/Sabre/DAV/includes.php b/3rdparty/Sabre/DAV/includes.php index 6a4890677ea..6a4890677ea 100644..100755 --- a/3rdparty/Sabre/DAV/includes.php +++ b/3rdparty/Sabre/DAV/includes.php diff --git a/3rdparty/Sabre/DAVACL/AbstractPrincipalCollection.php b/3rdparty/Sabre/DAVACL/AbstractPrincipalCollection.php index e05b7749805..e05b7749805 100644..100755 --- a/3rdparty/Sabre/DAVACL/AbstractPrincipalCollection.php +++ b/3rdparty/Sabre/DAVACL/AbstractPrincipalCollection.php diff --git a/3rdparty/Sabre/DAVACL/Exception/AceConflict.php b/3rdparty/Sabre/DAVACL/Exception/AceConflict.php index 4b9f93b0036..4b9f93b0036 100644..100755 --- a/3rdparty/Sabre/DAVACL/Exception/AceConflict.php +++ b/3rdparty/Sabre/DAVACL/Exception/AceConflict.php diff --git a/3rdparty/Sabre/DAVACL/Exception/NeedPrivileges.php b/3rdparty/Sabre/DAVACL/Exception/NeedPrivileges.php index 9b055dd9709..9b055dd9709 100644..100755 --- a/3rdparty/Sabre/DAVACL/Exception/NeedPrivileges.php +++ b/3rdparty/Sabre/DAVACL/Exception/NeedPrivileges.php diff --git a/3rdparty/Sabre/DAVACL/Exception/NoAbstract.php b/3rdparty/Sabre/DAVACL/Exception/NoAbstract.php index f44e3e32281..f44e3e32281 100644..100755 --- a/3rdparty/Sabre/DAVACL/Exception/NoAbstract.php +++ b/3rdparty/Sabre/DAVACL/Exception/NoAbstract.php diff --git a/3rdparty/Sabre/DAVACL/Exception/NotRecognizedPrincipal.php b/3rdparty/Sabre/DAVACL/Exception/NotRecognizedPrincipal.php index 8d1e38ca1b4..8d1e38ca1b4 100644..100755 --- a/3rdparty/Sabre/DAVACL/Exception/NotRecognizedPrincipal.php +++ b/3rdparty/Sabre/DAVACL/Exception/NotRecognizedPrincipal.php diff --git a/3rdparty/Sabre/DAVACL/Exception/NotSupportedPrivilege.php b/3rdparty/Sabre/DAVACL/Exception/NotSupportedPrivilege.php index 3b5d012d7fa..3b5d012d7fa 100644..100755 --- a/3rdparty/Sabre/DAVACL/Exception/NotSupportedPrivilege.php +++ b/3rdparty/Sabre/DAVACL/Exception/NotSupportedPrivilege.php diff --git a/3rdparty/Sabre/DAVACL/IACL.php b/3rdparty/Sabre/DAVACL/IACL.php index 003e6993483..003e6993483 100644..100755 --- a/3rdparty/Sabre/DAVACL/IACL.php +++ b/3rdparty/Sabre/DAVACL/IACL.php diff --git a/3rdparty/Sabre/DAVACL/IPrincipal.php b/3rdparty/Sabre/DAVACL/IPrincipal.php index fc7605bf625..fc7605bf625 100644..100755 --- a/3rdparty/Sabre/DAVACL/IPrincipal.php +++ b/3rdparty/Sabre/DAVACL/IPrincipal.php diff --git a/3rdparty/Sabre/DAVACL/IPrincipalBackend.php b/3rdparty/Sabre/DAVACL/IPrincipalBackend.php index e798bf890c0..e798bf890c0 100644..100755 --- a/3rdparty/Sabre/DAVACL/IPrincipalBackend.php +++ b/3rdparty/Sabre/DAVACL/IPrincipalBackend.php diff --git a/3rdparty/Sabre/DAVACL/Plugin.php b/3rdparty/Sabre/DAVACL/Plugin.php index 5c828c6d97b..5c828c6d97b 100644..100755 --- a/3rdparty/Sabre/DAVACL/Plugin.php +++ b/3rdparty/Sabre/DAVACL/Plugin.php diff --git a/3rdparty/Sabre/DAVACL/Principal.php b/3rdparty/Sabre/DAVACL/Principal.php index 51c6658afd6..51c6658afd6 100644..100755 --- a/3rdparty/Sabre/DAVACL/Principal.php +++ b/3rdparty/Sabre/DAVACL/Principal.php diff --git a/3rdparty/Sabre/DAVACL/PrincipalBackend/PDO.php b/3rdparty/Sabre/DAVACL/PrincipalBackend/PDO.php index a76b4a9d727..a76b4a9d727 100644..100755 --- a/3rdparty/Sabre/DAVACL/PrincipalBackend/PDO.php +++ b/3rdparty/Sabre/DAVACL/PrincipalBackend/PDO.php diff --git a/3rdparty/Sabre/DAVACL/PrincipalCollection.php b/3rdparty/Sabre/DAVACL/PrincipalCollection.php index c3e4cb83f23..c3e4cb83f23 100644..100755 --- a/3rdparty/Sabre/DAVACL/PrincipalCollection.php +++ b/3rdparty/Sabre/DAVACL/PrincipalCollection.php diff --git a/3rdparty/Sabre/DAVACL/Property/Acl.php b/3rdparty/Sabre/DAVACL/Property/Acl.php index 05e1a690b3c..05e1a690b3c 100644..100755 --- a/3rdparty/Sabre/DAVACL/Property/Acl.php +++ b/3rdparty/Sabre/DAVACL/Property/Acl.php diff --git a/3rdparty/Sabre/DAVACL/Property/AclRestrictions.php b/3rdparty/Sabre/DAVACL/Property/AclRestrictions.php index a8b054956dd..a8b054956dd 100644..100755 --- a/3rdparty/Sabre/DAVACL/Property/AclRestrictions.php +++ b/3rdparty/Sabre/DAVACL/Property/AclRestrictions.php diff --git a/3rdparty/Sabre/DAVACL/Property/CurrentUserPrivilegeSet.php b/3rdparty/Sabre/DAVACL/Property/CurrentUserPrivilegeSet.php index 94a29640615..94a29640615 100644..100755 --- a/3rdparty/Sabre/DAVACL/Property/CurrentUserPrivilegeSet.php +++ b/3rdparty/Sabre/DAVACL/Property/CurrentUserPrivilegeSet.php diff --git a/3rdparty/Sabre/DAVACL/Property/Principal.php b/3rdparty/Sabre/DAVACL/Property/Principal.php index c36328a58e0..c36328a58e0 100644..100755 --- a/3rdparty/Sabre/DAVACL/Property/Principal.php +++ b/3rdparty/Sabre/DAVACL/Property/Principal.php diff --git a/3rdparty/Sabre/DAVACL/Property/SupportedPrivilegeSet.php b/3rdparty/Sabre/DAVACL/Property/SupportedPrivilegeSet.php index 276d57ae093..276d57ae093 100644..100755 --- a/3rdparty/Sabre/DAVACL/Property/SupportedPrivilegeSet.php +++ b/3rdparty/Sabre/DAVACL/Property/SupportedPrivilegeSet.php diff --git a/3rdparty/Sabre/DAVACL/Version.php b/3rdparty/Sabre/DAVACL/Version.php index 9950f748741..9950f748741 100644..100755 --- a/3rdparty/Sabre/DAVACL/Version.php +++ b/3rdparty/Sabre/DAVACL/Version.php diff --git a/3rdparty/Sabre/DAVACL/includes.php b/3rdparty/Sabre/DAVACL/includes.php index 28fa3eed225..28fa3eed225 100644..100755 --- a/3rdparty/Sabre/DAVACL/includes.php +++ b/3rdparty/Sabre/DAVACL/includes.php diff --git a/3rdparty/Sabre/HTTP/AWSAuth.php b/3rdparty/Sabre/HTTP/AWSAuth.php index fb8245c8cbf..fb8245c8cbf 100644..100755 --- a/3rdparty/Sabre/HTTP/AWSAuth.php +++ b/3rdparty/Sabre/HTTP/AWSAuth.php diff --git a/3rdparty/Sabre/HTTP/AbstractAuth.php b/3rdparty/Sabre/HTTP/AbstractAuth.php index 3bccabcd1c1..3bccabcd1c1 100644..100755 --- a/3rdparty/Sabre/HTTP/AbstractAuth.php +++ b/3rdparty/Sabre/HTTP/AbstractAuth.php diff --git a/3rdparty/Sabre/HTTP/BasicAuth.php b/3rdparty/Sabre/HTTP/BasicAuth.php index a747cc6a31b..a747cc6a31b 100644..100755 --- a/3rdparty/Sabre/HTTP/BasicAuth.php +++ b/3rdparty/Sabre/HTTP/BasicAuth.php diff --git a/3rdparty/Sabre/HTTP/DigestAuth.php b/3rdparty/Sabre/HTTP/DigestAuth.php index ee7f05c08ed..ee7f05c08ed 100644..100755 --- a/3rdparty/Sabre/HTTP/DigestAuth.php +++ b/3rdparty/Sabre/HTTP/DigestAuth.php diff --git a/3rdparty/Sabre/HTTP/Request.php b/3rdparty/Sabre/HTTP/Request.php index 4746ef77704..4746ef77704 100644..100755 --- a/3rdparty/Sabre/HTTP/Request.php +++ b/3rdparty/Sabre/HTTP/Request.php diff --git a/3rdparty/Sabre/HTTP/Response.php b/3rdparty/Sabre/HTTP/Response.php index ffe9bda2082..ffe9bda2082 100644..100755 --- a/3rdparty/Sabre/HTTP/Response.php +++ b/3rdparty/Sabre/HTTP/Response.php diff --git a/3rdparty/Sabre/HTTP/Util.php b/3rdparty/Sabre/HTTP/Util.php index 67bdd489e1e..67bdd489e1e 100644..100755 --- a/3rdparty/Sabre/HTTP/Util.php +++ b/3rdparty/Sabre/HTTP/Util.php diff --git a/3rdparty/Sabre/HTTP/Version.php b/3rdparty/Sabre/HTTP/Version.php index 23dc7f8a7a1..23dc7f8a7a1 100644..100755 --- a/3rdparty/Sabre/HTTP/Version.php +++ b/3rdparty/Sabre/HTTP/Version.php diff --git a/3rdparty/Sabre/HTTP/includes.php b/3rdparty/Sabre/HTTP/includes.php index 9d34bf3a8be..9d34bf3a8be 100644..100755 --- a/3rdparty/Sabre/HTTP/includes.php +++ b/3rdparty/Sabre/HTTP/includes.php diff --git a/3rdparty/Sabre/VObject/Component.php b/3rdparty/Sabre/VObject/Component.php index b78a26133fa..b78a26133fa 100644..100755 --- a/3rdparty/Sabre/VObject/Component.php +++ b/3rdparty/Sabre/VObject/Component.php diff --git a/3rdparty/Sabre/VObject/Component/VAlarm.php b/3rdparty/Sabre/VObject/Component/VAlarm.php index ebb4a9b18f6..ebb4a9b18f6 100644..100755 --- a/3rdparty/Sabre/VObject/Component/VAlarm.php +++ b/3rdparty/Sabre/VObject/Component/VAlarm.php diff --git a/3rdparty/Sabre/VObject/Component/VCalendar.php b/3rdparty/Sabre/VObject/Component/VCalendar.php index f3be29afdbb..f3be29afdbb 100644..100755 --- a/3rdparty/Sabre/VObject/Component/VCalendar.php +++ b/3rdparty/Sabre/VObject/Component/VCalendar.php diff --git a/3rdparty/Sabre/VObject/Component/VEvent.php b/3rdparty/Sabre/VObject/Component/VEvent.php index 4cc1e36d7d6..4cc1e36d7d6 100644..100755 --- a/3rdparty/Sabre/VObject/Component/VEvent.php +++ b/3rdparty/Sabre/VObject/Component/VEvent.php diff --git a/3rdparty/Sabre/VObject/Component/VJournal.php b/3rdparty/Sabre/VObject/Component/VJournal.php index 22b3ec921e5..22b3ec921e5 100644..100755 --- a/3rdparty/Sabre/VObject/Component/VJournal.php +++ b/3rdparty/Sabre/VObject/Component/VJournal.php diff --git a/3rdparty/Sabre/VObject/Component/VTodo.php b/3rdparty/Sabre/VObject/Component/VTodo.php index 79d06298d7f..79d06298d7f 100644..100755 --- a/3rdparty/Sabre/VObject/Component/VTodo.php +++ b/3rdparty/Sabre/VObject/Component/VTodo.php diff --git a/3rdparty/Sabre/VObject/DateTimeParser.php b/3rdparty/Sabre/VObject/DateTimeParser.php index 1e2d54ef3a9..23a4bb69916 100644..100755 --- a/3rdparty/Sabre/VObject/DateTimeParser.php +++ b/3rdparty/Sabre/VObject/DateTimeParser.php @@ -125,6 +125,9 @@ class Sabre_VObject_DateTimeParser { } + if ($duration==='P') { + $duration = 'PT0S'; + } $iv = new DateInterval($duration); if ($invert) $iv->invert = true; @@ -150,6 +153,7 @@ class Sabre_VObject_DateTimeParser { } $newDur = ($matches['plusminus']==='-'?'-':'+') . trim($newDur); + if ($newDur === '+') { $newDur = '+0 seconds'; }; return $newDur; } diff --git a/3rdparty/Sabre/VObject/Element.php b/3rdparty/Sabre/VObject/Element.php index e20ff0b353c..e20ff0b353c 100644..100755 --- a/3rdparty/Sabre/VObject/Element.php +++ b/3rdparty/Sabre/VObject/Element.php diff --git a/3rdparty/Sabre/VObject/Element/DateTime.php b/3rdparty/Sabre/VObject/Element/DateTime.php index 5e5eb7ab6f2..5e5eb7ab6f2 100644..100755 --- a/3rdparty/Sabre/VObject/Element/DateTime.php +++ b/3rdparty/Sabre/VObject/Element/DateTime.php diff --git a/3rdparty/Sabre/VObject/Element/MultiDateTime.php b/3rdparty/Sabre/VObject/Element/MultiDateTime.php index 8a12ced94a8..8a12ced94a8 100644..100755 --- a/3rdparty/Sabre/VObject/Element/MultiDateTime.php +++ b/3rdparty/Sabre/VObject/Element/MultiDateTime.php diff --git a/3rdparty/Sabre/VObject/ElementList.php b/3rdparty/Sabre/VObject/ElementList.php index 7e508db20f0..7e508db20f0 100644..100755 --- a/3rdparty/Sabre/VObject/ElementList.php +++ b/3rdparty/Sabre/VObject/ElementList.php diff --git a/3rdparty/Sabre/VObject/FreeBusyGenerator.php b/3rdparty/Sabre/VObject/FreeBusyGenerator.php index 1c96a64a004..1c96a64a004 100644..100755 --- a/3rdparty/Sabre/VObject/FreeBusyGenerator.php +++ b/3rdparty/Sabre/VObject/FreeBusyGenerator.php diff --git a/3rdparty/Sabre/VObject/Node.php b/3rdparty/Sabre/VObject/Node.php index d89e01b56c6..d89e01b56c6 100644..100755 --- a/3rdparty/Sabre/VObject/Node.php +++ b/3rdparty/Sabre/VObject/Node.php diff --git a/3rdparty/Sabre/VObject/Parameter.php b/3rdparty/Sabre/VObject/Parameter.php index 2e39af5f78a..2e39af5f78a 100644..100755 --- a/3rdparty/Sabre/VObject/Parameter.php +++ b/3rdparty/Sabre/VObject/Parameter.php diff --git a/3rdparty/Sabre/VObject/ParseException.php b/3rdparty/Sabre/VObject/ParseException.php index 1b5e95bf16e..1b5e95bf16e 100644..100755 --- a/3rdparty/Sabre/VObject/ParseException.php +++ b/3rdparty/Sabre/VObject/ParseException.php diff --git a/3rdparty/Sabre/VObject/Property.php b/3rdparty/Sabre/VObject/Property.php index ce74fe3865b..ce74fe3865b 100644..100755 --- a/3rdparty/Sabre/VObject/Property.php +++ b/3rdparty/Sabre/VObject/Property.php diff --git a/3rdparty/Sabre/VObject/Property/DateTime.php b/3rdparty/Sabre/VObject/Property/DateTime.php index fe2372caa81..fe2372caa81 100644..100755 --- a/3rdparty/Sabre/VObject/Property/DateTime.php +++ b/3rdparty/Sabre/VObject/Property/DateTime.php diff --git a/3rdparty/Sabre/VObject/Property/MultiDateTime.php b/3rdparty/Sabre/VObject/Property/MultiDateTime.php index ae53ab6a617..ae53ab6a617 100644..100755 --- a/3rdparty/Sabre/VObject/Property/MultiDateTime.php +++ b/3rdparty/Sabre/VObject/Property/MultiDateTime.php diff --git a/3rdparty/Sabre/VObject/Reader.php b/3rdparty/Sabre/VObject/Reader.php index eea73fa3dce..eea73fa3dce 100644..100755 --- a/3rdparty/Sabre/VObject/Reader.php +++ b/3rdparty/Sabre/VObject/Reader.php diff --git a/3rdparty/Sabre/VObject/RecurrenceIterator.php b/3rdparty/Sabre/VObject/RecurrenceIterator.php index 833aa091ab7..833aa091ab7 100644..100755 --- a/3rdparty/Sabre/VObject/RecurrenceIterator.php +++ b/3rdparty/Sabre/VObject/RecurrenceIterator.php diff --git a/3rdparty/Sabre/VObject/Version.php b/3rdparty/Sabre/VObject/Version.php index 00110febc07..2617c7b129d 100644..100755 --- a/3rdparty/Sabre/VObject/Version.php +++ b/3rdparty/Sabre/VObject/Version.php @@ -14,7 +14,7 @@ class Sabre_VObject_Version { /** * Full version number */ - const VERSION = '1.3.2'; + const VERSION = '1.3.3'; /** * Stability : alpha, beta, stable diff --git a/3rdparty/Sabre/VObject/WindowsTimezoneMap.php b/3rdparty/Sabre/VObject/WindowsTimezoneMap.php index 5e1cc5d479b..5e1cc5d479b 100644..100755 --- a/3rdparty/Sabre/VObject/WindowsTimezoneMap.php +++ b/3rdparty/Sabre/VObject/WindowsTimezoneMap.php diff --git a/3rdparty/Sabre/VObject/includes.php b/3rdparty/Sabre/VObject/includes.php index 0177a8f1ba6..0177a8f1ba6 100644..100755 --- a/3rdparty/Sabre/VObject/includes.php +++ b/3rdparty/Sabre/VObject/includes.php diff --git a/3rdparty/Sabre/autoload.php b/3rdparty/Sabre/autoload.php index c7b537d83d3..c7b537d83d3 100644..100755 --- a/3rdparty/Sabre/autoload.php +++ b/3rdparty/Sabre/autoload.php diff --git a/apps/calendar/ajax/share/changepermission.php b/apps/calendar/ajax/share/changepermission.php index e807c164a23..5aff7666f79 100644 --- a/apps/calendar/ajax/share/changepermission.php +++ b/apps/calendar/ajax/share/changepermission.php @@ -5,7 +5,9 @@ * later. * See the COPYING-README file. */ - + +OCP\JSON::callCheck(); + $id = strip_tags($_POST['id']); $idtype = strip_tags($_POST['idtype']); $permission = (int) strip_tags($_POST['permission']); diff --git a/apps/calendar/ajax/share/share.php b/apps/calendar/ajax/share/share.php index 838db619f62..77e1ab9d657 100644 --- a/apps/calendar/ajax/share/share.php +++ b/apps/calendar/ajax/share/share.php @@ -6,6 +6,8 @@ * See the COPYING-README file. */ +OCP\JSON::callCheck(); + $id = strip_tags($_POST['id']); $idtype = strip_tags($_POST['idtype']); switch($idtype){ diff --git a/apps/calendar/ajax/share/unshare.php b/apps/calendar/ajax/share/unshare.php index 1ce04677fb1..c7c06113189 100644 --- a/apps/calendar/ajax/share/unshare.php +++ b/apps/calendar/ajax/share/unshare.php @@ -5,7 +5,9 @@ * later. * See the COPYING-README file. */ - + +OCP\JSON::callCheck(); + $id = strip_tags($_POST['id']); $idtype = strip_tags($_POST['idtype']); switch($idtype){ diff --git a/apps/contacts/ajax/addproperty.php b/apps/contacts/ajax/addproperty.php index 96f27b2b9bb..58b857547fb 100644 --- a/apps/contacts/ajax/addproperty.php +++ b/apps/contacts/ajax/addproperty.php @@ -48,10 +48,11 @@ if(!$vcard) { if(!is_array($value)) { $value = trim($value); - if(!$value && in_array( - $name, - array('TEL', 'EMAIL', 'ORG', 'BDAY', 'URL', 'NICKNAME', 'NOTE')) - ) { + if(!$value + && in_array( + $name, + array('TEL', 'EMAIL', 'ORG', 'BDAY', 'URL', 'NICKNAME', 'NOTE')) + ) { bailOut($l10n->t('Cannot add empty property.')); } } elseif($name === 'ADR') { // only add if non-empty elements. @@ -129,7 +130,7 @@ foreach ($parameters as $key=>$element) { // NOTE: Maybe this doesn't only apply for TYPE? // And it probably shouldn't be done here anyways :-/ foreach($element as $e) { - if($e != '' && !is_null($e)){ + if($e != '' && !is_null($e)) { $vcard->children[$line]->parameters[] = new Sabre_VObject_Parameter($key, $e); } } diff --git a/apps/contacts/ajax/savecrop.php b/apps/contacts/ajax/savecrop.php index 3958af5c07c..8ee2e46bf0c 100644 --- a/apps/contacts/ajax/savecrop.php +++ b/apps/contacts/ajax/savecrop.php @@ -89,7 +89,7 @@ if($data) { } $now = new DateTime; $card->setString('REV', $now->format(DateTime::W3C)); - if(!OC_Contacts_VCard::edit($id,$card)) { + if(!OC_Contacts_VCard::edit($id, $card)) { bailOut(OC_Contacts_App::$l10n->t('Error saving contact.')); } $tmpl = new OCP\Template("contacts", "part.contactphoto"); diff --git a/apps/contacts/ajax/saveproperty.php b/apps/contacts/ajax/saveproperty.php index c3aaf5a9596..5d743c99df4 100644 --- a/apps/contacts/ajax/saveproperty.php +++ b/apps/contacts/ajax/saveproperty.php @@ -129,7 +129,7 @@ if(!$value) { } //debug('New checksum: '.$checksum); -if(!OC_Contacts_VCard::edit($id,$vcard)) { +if(!OC_Contacts_VCard::edit($id, $vcard)) { bailOut(OC_Contacts_App::$l10n->t('Error updating contact property.')); exit(); } diff --git a/apps/contacts/appinfo/app.php b/apps/contacts/appinfo/app.php index 33e89c3e9be..cbbbbc79e58 100644 --- a/apps/contacts/appinfo/app.php +++ b/apps/contacts/appinfo/app.php @@ -19,6 +19,6 @@ OCP\App::addNavigationEntry( array( 'name' => OC_L10N::get('contacts')->t('Contacts') )); -OCP\App::registerPersonal('contacts','settings'); +OCP\App::registerPersonal('contacts', 'settings'); OCP\Util::addscript('contacts', 'loader'); OC_Search::registerProvider('OC_Search_Provider_Contacts'); diff --git a/apps/contacts/appinfo/migrate.php b/apps/contacts/appinfo/migrate.php index 02026c5979c..2559b4ea456 100644 --- a/apps/contacts/appinfo/migrate.php +++ b/apps/contacts/appinfo/migrate.php @@ -2,7 +2,7 @@ class OC_Migration_Provider_Contacts extends OC_Migration_Provider{ // Create the xml for the user supplied - function export( ){ + function export( ) { $options = array( 'table'=>'contacts_addressbooks', 'matchcol'=>'userid', @@ -21,9 +21,8 @@ class OC_Migration_Provider_Contacts extends OC_Migration_Provider{ $ids2 = $this->content->copyRows( $options ); // If both returned some ids then they worked - if( is_array( $ids ) && is_array( $ids2 ) ) - { - return true; + if(is_array($ids) && is_array($ids2)) { + return true; } else { return false; } @@ -31,14 +30,14 @@ class OC_Migration_Provider_Contacts extends OC_Migration_Provider{ } // Import function for contacts - function import( ){ - switch( $this->appinfo->version ){ + function import( ) { + switch( $this->appinfo->version ) { default: // All versions of the app have had the same db structure, so all can use the same import function $query = $this->content->prepare( "SELECT * FROM contacts_addressbooks WHERE userid LIKE ?" ); $results = $query->execute( array( $this->olduid ) ); $idmap = array(); - while( $row = $results->fetchRow() ){ + while( $row = $results->fetchRow() ) { // Import each addressbook $addressbookquery = OCP\DB::prepare( "INSERT INTO *PREFIX*contacts_addressbooks (`userid`, `displayname`, `uri`, `description`, `ctag`) VALUES (?, ?, ?, ?, ?)" ); $addressbookquery->execute( array( $this->uid, $row['displayname'], $row['uri'], $row['description'], $row['ctag'] ) ); @@ -48,7 +47,7 @@ class OC_Migration_Provider_Contacts extends OC_Migration_Provider{ OC_Contacts_Addressbook::setActive($idmap[$row['id']], true); } // Now tags - foreach($idmap as $oldid => $newid){ + foreach($idmap as $oldid => $newid) { $query = $this->content->prepare( "SELECT * FROM contacts_cards WHERE addressbookid LIKE ?" ); $results = $query->execute( array( $oldid ) ); diff --git a/apps/contacts/appinfo/remote.php b/apps/contacts/appinfo/remote.php index 09c2de17990..fd5604aec6f 100644 --- a/apps/contacts/appinfo/remote.php +++ b/apps/contacts/appinfo/remote.php @@ -22,7 +22,7 @@ OCP\App::checkAppEnabled('contacts'); -if(substr($_SERVER["REQUEST_URI"],0,strlen(OC_App::getAppWebPath('contacts').'/carddav.php')) == OC_App::getAppWebPath('contacts').'/carddav.php'){ +if(substr($_SERVER["REQUEST_URI"], 0, strlen(OC_App::getAppWebPath('contacts').'/carddav.php')) == OC_App::getAppWebPath('contacts').'/carddav.php') { $baseuri = OC_App::getAppWebPath('contacts').'/carddav.php'; } @@ -45,7 +45,7 @@ $nodes = array( $server = new Sabre_DAV_Server($nodes); $server->setBaseUri($baseuri); // Add plugins -$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); +$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend, 'ownCloud')); $server->addPlugin(new Sabre_CardDAV_Plugin()); $server->addPlugin(new Sabre_DAVACL_Plugin()); $server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload diff --git a/apps/contacts/carddav.php b/apps/contacts/carddav.php index e0579e625d7..264eb30836b 100644 --- a/apps/contacts/carddav.php +++ b/apps/contacts/carddav.php @@ -1,6 +1,6 @@ <?php -if(!file_exists('../../lib/base.php')){ +if(!file_exists('../../lib/base.php')) { die('Please update the path to /lib/base.php in carddav.php or make use of /remote.php/carddav/'); } -require_once('../../lib/base.php'); -require_once('appinfo/remote.php');
\ No newline at end of file +require_once '../../lib/base.php'; +require_once 'appinfo/remote.php';
\ No newline at end of file diff --git a/apps/contacts/export.php b/apps/contacts/export.php index eb506506c42..161ca8047ac 100644 --- a/apps/contacts/export.php +++ b/apps/contacts/export.php @@ -9,26 +9,30 @@ OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('contacts'); -$bookid = isset($_GET['bookid']) ? $_GET['bookid'] : NULL; -$contactid = isset($_GET['contactid']) ? $_GET['contactid'] : NULL; +$bookid = isset($_GET['bookid']) ? $_GET['bookid'] : null; +$contactid = isset($_GET['contactid']) ? $_GET['contactid'] : null; $nl = "\n"; -if(isset($bookid)){ +if(isset($bookid)) { $addressbook = OC_Contacts_App::getAddressbook($bookid); //$cardobjects = OC_Contacts_VCard::all($bookid); header('Content-Type: text/directory'); - header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $addressbook['displayname']) . '.vcf'); + header('Content-Disposition: inline; filename=' + . str_replace(' ', '_', $addressbook['displayname']) . '.vcf'); $start = 0; - $batchsize = OCP\Config::getUserValue(OCP\User::getUser(), 'contacts', 'export_batch_size', 20); + $batchsize = OCP\Config::getUserValue(OCP\User::getUser(), + 'contacts', + 'export_batch_size', 20); while($cardobjects = OC_Contacts_VCard::all($bookid, $start, $batchsize)){ foreach($cardobjects as $card) { echo $card['carddata'] . $nl; } $start += $batchsize; } -}elseif(isset($contactid)){ +}elseif(isset($contactid)) { $data = OC_Contacts_App::getContactObject($contactid); header('Content-Type: text/vcard'); - header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $data['fullname']) . '.vcf'); + header('Content-Disposition: inline; filename=' + . str_replace(' ', '_', $data['fullname']) . '.vcf'); echo $data['carddata']; } diff --git a/apps/contacts/import.php b/apps/contacts/import.php index 7d3acf86cf8..1986d79f6d6 100644 --- a/apps/contacts/import.php +++ b/apps/contacts/import.php @@ -38,17 +38,29 @@ if(!$file) { OCP\JSON::error(array('data' => array('message' => 'Import file was empty.'))); exit(); } -if(isset($_POST['method']) && $_POST['method'] == 'new'){ - $id = OC_Contacts_Addressbook::add(OCP\USER::getUser(), $_POST['addressbookname']); +if(isset($_POST['method']) && $_POST['method'] == 'new') { + $id = OC_Contacts_Addressbook::add(OCP\USER::getUser(), + $_POST['addressbookname']); if(!$id) { - OCP\JSON::error(array('data' => array('message' => 'Error creating address book.'))); + OCP\JSON::error( + array( + 'data' => array('message' => 'Error creating address book.') + ) + ); exit(); } OC_Contacts_Addressbook::setActive($id, 1); }else{ $id = $_POST['id']; if(!$id) { - OCP\JSON::error(array('data' => array('message' => 'Error getting the ID of the address book.', 'file'=>$_POST['file']))); + OCP\JSON::error( + array( + 'data' => array( + 'message' => 'Error getting the ID of the address book.', + 'file'=>$_POST['file'] + ) + ) + ); exit(); } OC_Contacts_App::getAddressbook($id); // is owner access check @@ -62,7 +74,7 @@ $inelement = false; $parts = array(); $card = array(); foreach($lines as $line){ - if(strtoupper(trim($line)) == 'BEGIN:VCARD'){ + if(strtoupper(trim($line)) == 'BEGIN:VCARD') { $inelement = true; } elseif (strtoupper(trim($line)) == 'END:VCARD') { $card[] = $line; @@ -79,10 +91,20 @@ writeProgress('70'); $imported = 0; $failed = 0; if(!count($parts) > 0) { - OCP\JSON::error(array('data' => array('message' => 'No contacts to import in '.$_POST['file'].'. Please check if the file is corrupted.', 'file'=>$_POST['file']))); + OCP\JSON::error( + array( + 'data' => array( + 'message' => 'No contacts to import in ' + . $_POST['file'].'. Please check if the file is corrupted.', + 'file'=>$_POST['file'] + ) + ) + ); if(isset($_POST['fstype']) && $_POST['fstype'] == 'OC_FilesystemView') { if(!$view->unlink('/imports/' . $_POST['file'])) { - OCP\Util::writeLog('contacts','Import: Error unlinking OC_FilesystemView ' . '/' . $_POST['file'], OCP\Util::ERROR); + OCP\Util::writeLog('contacts', + 'Import: Error unlinking OC_FilesystemView ' . '/' . $_POST['file'], + OCP\Util::ERROR); } } exit(); @@ -91,14 +113,18 @@ foreach($parts as $part){ $card = OC_VObject::parse($part); if (!$card) { $failed += 1; - OCP\Util::writeLog('contacts','Import: skipping card. Error parsing VCard: '.$part, OCP\Util::ERROR); + OCP\Util::writeLog('contacts', + 'Import: skipping card. Error parsing VCard: ' . $part, + OCP\Util::ERROR); continue; // Ditch cards that can't be parsed by Sabre. } try { OC_Contacts_VCard::add($id, $card); $imported += 1; } catch (Exception $e) { - OCP\Util::writeLog('contacts', 'Error importing vcard: '.$e->getMessage().$nl.$card, OCP\Util::ERROR); + OCP\Util::writeLog('contacts', + 'Error importing vcard: ' . $e->getMessage() . $nl . $card, + OCP\Util::ERROR); $failed += 1; } } @@ -108,7 +134,17 @@ sleep(3); OC_Cache::remove($progresskey); if(isset($_POST['fstype']) && $_POST['fstype'] == 'OC_FilesystemView') { if(!$view->unlink('/imports/' . $_POST['file'])) { - OCP\Util::writeLog('contacts','Import: Error unlinking OC_FilesystemView ' . '/' . $_POST['file'], OCP\Util::ERROR); + OCP\Util::writeLog('contacts', + 'Import: Error unlinking OC_FilesystemView ' . '/' . $_POST['file'], + OCP\Util::ERROR); } } -OCP\JSON::success(array('data' => array('imported'=>$imported, 'failed'=>$failed, 'file'=>$_POST['file']))); +OCP\JSON::success( + array( + 'data' => array( + 'imported'=>$imported, + 'failed'=>$failed, + 'file'=>$_POST['file'], + ) + ) +); diff --git a/apps/contacts/index.php b/apps/contacts/index.php index 00b1b4f7a95..c35e1b85d4e 100644 --- a/apps/contacts/index.php +++ b/apps/contacts/index.php @@ -14,13 +14,17 @@ OCP\App::checkAppEnabled('contacts'); // Get active address books. This creates a default one if none exists. $ids = OC_Contacts_Addressbook::activeIds(OCP\USER::getUser()); -$has_contacts = (count(OC_Contacts_VCard::all($ids, 0, 1)) > 0 ? true : false); // just to check if there are any contacts. +$has_contacts = (count(OC_Contacts_VCard::all($ids, 0, 1)) > 0 + ? true + : false); // just to check if there are any contacts. if($has_contacts === false) { - OCP\Util::writeLog('contacts','index.html: No contacts found.',OCP\Util::DEBUG); + OCP\Util::writeLog('contacts', + 'index.html: No contacts found.', + OCP\Util::DEBUG); } // Load the files we need -OCP\App::setActiveNavigationEntry( 'contacts_index' ); +OCP\App::setActiveNavigationEntry('contacts_index'); // Load a specific user? $id = isset( $_GET['id'] ) ? $_GET['id'] : null; @@ -34,30 +38,31 @@ $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); $maxUploadFilesize = min($upload_max_filesize, $post_max_size); $freeSpace=OC_Filesystem::free_space('/'); -$freeSpace=max($freeSpace,0); -$maxUploadFilesize = min($maxUploadFilesize ,$freeSpace); - -OCP\Util::addscript('','jquery.multiselect'); -OCP\Util::addscript('','oc-vcategories'); -OCP\Util::addscript('contacts','contacts'); -OCP\Util::addscript('contacts','expanding'); -OCP\Util::addscript('contacts','jquery.combobox'); +$freeSpace=max($freeSpace, 0); +$maxUploadFilesize = min($maxUploadFilesize, $freeSpace); + +OCP\Util::addscript('', 'jquery.multiselect'); +OCP\Util::addscript('', 'oc-vcategories'); +OCP\Util::addscript('contacts', 'contacts'); +OCP\Util::addscript('contacts', 'expanding'); +OCP\Util::addscript('contacts', 'jquery.combobox'); OCP\Util::addscript('files', 'jquery.fileupload'); -OCP\Util::addscript('contacts','jquery.inview'); -OCP\Util::addscript('contacts','jquery.Jcrop'); -OCP\Util::addscript('contacts','jquery.multi-autocomplete'); -OCP\Util::addStyle('','jquery.multiselect'); -OCP\Util::addStyle('contacts','jquery.combobox'); -OCP\Util::addStyle('contacts','jquery.Jcrop'); -OCP\Util::addStyle('contacts','contacts'); +OCP\Util::addscript('contacts', 'jquery.inview'); +OCP\Util::addscript('contacts', 'jquery.Jcrop'); +OCP\Util::addscript('contacts', 'jquery.multi-autocomplete'); +OCP\Util::addStyle('', 'jquery.multiselect'); +OCP\Util::addStyle('contacts', 'jquery.combobox'); +OCP\Util::addStyle('contacts', 'jquery.Jcrop'); +OCP\Util::addStyle('contacts', 'contacts'); $tmpl = new OCP\Template( "contacts", "index", "user" ); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize, false); -$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize), false); +$tmpl->assign('uploadMaxHumanFilesize', + OCP\Util::humanFileSize($maxUploadFilesize), false); $tmpl->assign('property_types', $property_types, false); $tmpl->assign('phone_types', $phone_types, false); $tmpl->assign('email_types', $email_types, false); $tmpl->assign('categories', $categories, false); $tmpl->assign('has_contacts', $has_contacts, false); -$tmpl->assign('id',$id, false); +$tmpl->assign('id', $id, false); $tmpl->printPage(); diff --git a/apps/contacts/lib/addressbook.php b/apps/contacts/lib/addressbook.php index 65e02312bde..eb61b6dbced 100644 --- a/apps/contacts/lib/addressbook.php +++ b/apps/contacts/lib/addressbook.php @@ -133,7 +133,7 @@ class OC_Contacts_Addressbook { if(is_null($uid)) { $uid = OCP\USER::getUser(); } - $id = self::add($uid,'Contacts', 'Default Address Book'); + $id = self::add($uid, 'Contacts', 'Default Address Book'); if($id !== false) { self::setActive($id, true); } diff --git a/apps/contacts/lib/connector_sabre.php b/apps/contacts/lib/connector_sabre.php index 99b94fc767e..9fcfff08fa8 100644 --- a/apps/contacts/lib/connector_sabre.php +++ b/apps/contacts/lib/connector_sabre.php @@ -79,7 +79,7 @@ class OC_Connector_Sabre_CardDAV extends Sabre_CardDAV_Backend_Abstract { } } - OC_Contacts_Addressbook::edit($addressbookid,$name,$description); + OC_Contacts_Addressbook::edit($addressbookid, $name, $description); return true; @@ -113,7 +113,7 @@ class OC_Connector_Sabre_CardDAV extends Sabre_CardDAV_Backend_Abstract { } - OC_Contacts_Addressbook::addFromDAVData($principaluri,$url,$name,$description); + OC_Contacts_Addressbook::addFromDAVData($principaluri, $url, $name, $description); } /** @@ -156,7 +156,7 @@ class OC_Connector_Sabre_CardDAV extends Sabre_CardDAV_Backend_Abstract { * @return array */ public function getCard($addressbookid, $carduri) { - return OC_Contacts_VCard::findWhereDAVDataIs($addressbookid,$carduri); + return OC_Contacts_VCard::findWhereDAVDataIs($addressbookid, $carduri); } diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php index 732c5a22581..6b9a4c04f1e 100644 --- a/apps/contacts/lib/vcard.php +++ b/apps/contacts/lib/vcard.php @@ -212,7 +212,7 @@ class OC_Contacts_VCard{ // Add version if needed if($version && $version < '3.0') { $upgrade = true; - OCP\Util::writeLog('contacts','OC_Contacts_VCard::updateValuesFromAdd. Updating from version: '.$version,OCP\Util::DEBUG); + OCP\Util::writeLog('contacts', 'OC_Contacts_VCard::updateValuesFromAdd. Updating from version: '.$version,OCP\Util::DEBUG); } foreach($vcard->children as &$property){ // Decode string properties and remove obsolete properties. @@ -487,7 +487,7 @@ class OC_Contacts_VCard{ public static function unescapeDelimiters($value, $delimiter=';') { $array = explode($delimiter, $value); for($i=0;$i<count($array);$i++) { - if(substr($array[$i],-1, 1)=="\\") { + if(substr($array[$i], -1, 1)=="\\") { if(isset($array[$i+1])) { $array[$i] = substr($array[$i], 0, count($array[$i])-2).$delimiter.$array[$i+1]; unset($array[$i+1]); diff --git a/apps/contacts/photo.php b/apps/contacts/photo.php index 4660d61f618..efdf157cd95 100644 --- a/apps/contacts/photo.php +++ b/apps/contacts/photo.php @@ -13,7 +13,7 @@ OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('contacts'); -function getStandardImage(){ +function getStandardImage() { //OCP\Response::setExpiresHeader('P10D'); OCP\Response::enableCaching(); OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person_large.png')); @@ -27,37 +27,39 @@ if(is_null($id)) { } if(!extension_loaded('gd') || !function_exists('gd_info')) { - OCP\Util::writeLog('contacts','photo.php. GD module not installed',OCP\Util::DEBUG); + OCP\Util::writeLog('contacts', + 'photo.php. GD module not installed', OCP\Util::DEBUG); getStandardImage(); } $contact = OC_Contacts_App::getContactVCard($id); $image = new OC_Image(); -if(!$image) { +if (!$image) { getStandardImage(); } // invalid vcard -if( is_null($contact)) { - OCP\Util::writeLog('contacts','photo.php. The VCard for ID '.$id.' is not RFC compatible',OCP\Util::ERROR); +if (is_null($contact)) { + OCP\Util::writeLog('contacts', + 'photo.php. The VCard for ID ' . $id . ' is not RFC compatible', + OCP\Util::ERROR); } else { OCP\Response::enableCaching($caching); OC_Contacts_App::setLastModifiedHeader($contact); // Photo :-) - if($image->loadFromBase64($contact->getAsString('PHOTO'))) { + if ($image->loadFromBase64($contact->getAsString('PHOTO'))) { // OK OCP\Response::setETagHeader(md5($contact->getAsString('PHOTO'))); } else // Logo :-/ - if($image->loadFromBase64($contact->getAsString('LOGO'))) { + if ($image->loadFromBase64($contact->getAsString('LOGO'))) { // OK OCP\Response::setETagHeader(md5($contact->getAsString('LOGO'))); } if ($image->valid()) { $max_size = 200; - if($image->width() > $max_size || - $image->height() > $max_size) { + if ($image->width() > $max_size || $image->height() > $max_size) { $image->resize($max_size); } } @@ -65,8 +67,7 @@ if( is_null($contact)) { if (!$image->valid()) { // Not found :-( getStandardImage(); - //$image->loadFromFile('img/person_large.png'); } header('Content-Type: '.$image->mimeType()); $image->show(); -//echo OC_Contacts_App::$l10n->t('This card does not contain a photo.'); + diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php index 98cb67a26e7..1bc4a195534 100644 --- a/apps/contacts/templates/index.php +++ b/apps/contacts/templates/index.php @@ -25,7 +25,7 @@ </div> <div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>"> <?php - if($_['has_contacts']){ + if($_['has_contacts']) { echo $this->inc('part.contact'); } else{ diff --git a/apps/contacts/templates/part.cropphoto.php b/apps/contacts/templates/part.cropphoto.php index 6d7b1e44777..3f5817622b2 100644 --- a/apps/contacts/templates/part.cropphoto.php +++ b/apps/contacts/templates/part.cropphoto.php @@ -2,7 +2,6 @@ $id = $_['id']; $tmpkey = $_['tmpkey']; $requesttoken = $_['requesttoken']; -OCP\Util::writeLog('contacts','templates/part.cropphoto.php: tmpkey: '.$tmpkey, OCP\Util::DEBUG); ?> <script type="text/javascript"> jQuery(function($) { diff --git a/apps/contacts/templates/part.edit_categories_dialog.php b/apps/contacts/templates/part.edit_categories_dialog.php deleted file mode 100644 index 8997fa586bd..00000000000 --- a/apps/contacts/templates/part.edit_categories_dialog.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php -$categories = isset($_['categories'])?$_['categories']:array(); -?> -<div id="edit_categories_dialog" title="<?php echo $l->t('Edit categories'); ?>"> -<!-- ?php print_r($types); ? --> - <form method="post" id="categoryform"> - <div class="scrollarea"> - <ul id="categorylist"> - <?php foreach($categories as $category) { ?> - <li><input type="checkbox" name="categories[]" value="<?php echo $category; ?>" /><?php echo $category; ?></li> - <?php } ?> - </ul> - </div> - <div class="bottombuttons"><input type="text" id="category_addinput" name="category" /><button id="category_addbutton" disabled="disabled"><?php echo $l->t('Add'); ?></button></div> - </form> -</div> diff --git a/apps/contacts/thumbnail.php b/apps/contacts/thumbnail.php index a69e9c74f72..6deb5ca379e 100644 --- a/apps/contacts/thumbnail.php +++ b/apps/contacts/thumbnail.php @@ -25,14 +25,15 @@ OCP\JSON::checkLoggedIn(); OCP\App::checkAppEnabled('contacts'); session_write_close(); -function getStandardImage(){ +function getStandardImage() { //OCP\Response::setExpiresHeader('P10D'); OCP\Response::enableCaching(); OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person.png')); } if(!extension_loaded('gd') || !function_exists('gd_info')) { - OCP\Util::writeLog('contacts','thumbnail.php. GD module not installed',OCP\Util::DEBUG); + OCP\Util::writeLog('contacts', + 'thumbnail.php. GD module not installed', OCP\Util::DEBUG); getStandardImage(); exit(); } @@ -43,8 +44,10 @@ $caching = isset($_GET['refresh']) ? 0 : null; $contact = OC_Contacts_App::getContactVCard($id); // invalid vcard -if(is_null($contact)){ - OCP\Util::writeLog('contacts','thumbnail.php. The VCard for ID '.$id.' is not RFC compatible',OCP\Util::ERROR); +if(is_null($contact)) { + OCP\Util::writeLog('contacts', + 'thumbnail.php. The VCard for ID ' . $id . ' is not RFC compatible', + OCP\Util::ERROR); getStandardImage(); exit(); } @@ -64,16 +67,24 @@ if($photo) { if($image->show()) { exit(); } else { - OCP\Util::writeLog('contacts','thumbnail.php. Couldn\'t display thumbnail for ID '.$id,OCP\Util::ERROR); + OCP\Util::writeLog('contacts', + 'thumbnail.php. Couldn\'t display thumbnail for ID ' . $id, + OCP\Util::ERROR); } } else { - OCP\Util::writeLog('contacts','thumbnail.php. Couldn\'t resize thumbnail for ID '.$id,OCP\Util::ERROR); + OCP\Util::writeLog('contacts', + 'thumbnail.php. Couldn\'t resize thumbnail for ID ' . $id, + OCP\Util::ERROR); } }else{ - OCP\Util::writeLog('contacts','thumbnail.php. Couldn\'t crop thumbnail for ID '.$id,OCP\Util::ERROR); + OCP\Util::writeLog('contacts', + 'thumbnail.php. Couldn\'t crop thumbnail for ID ' . $id, + OCP\Util::ERROR); } } else { - OCP\Util::writeLog('contacts','thumbnail.php. Couldn\'t load image string for ID '.$id,OCP\Util::ERROR); + OCP\Util::writeLog('contacts', + 'thumbnail.php. Couldn\'t load image string for ID ' . $id, + OCP\Util::ERROR); } } getStandardImage(); diff --git a/apps/contacts/tmpphoto.php b/apps/contacts/tmpphoto.php index 5fde8de9977..156d5c80308 100644 --- a/apps/contacts/tmpphoto.php +++ b/apps/contacts/tmpphoto.php @@ -24,7 +24,7 @@ $tmpkey = $_GET['tmpkey']; $maxsize = isset($_GET['maxsize']) ? $_GET['maxsize'] : -1; header("Cache-Control: no-cache, no-store, must-revalidate"); -OCP\Util::writeLog('contacts','tmpphoto.php: tmpkey: '.$tmpkey, OCP\Util::DEBUG); +OCP\Util::writeLog('contacts', 'tmpphoto.php: tmpkey: '.$tmpkey, OCP\Util::DEBUG); $image = new OC_Image(); $image->loadFromData(OC_Cache::get($tmpkey)); diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php index 35663d431f8..c849db38433 100755 --- a/apps/files_external/lib/dropbox.php +++ b/apps/files_external/lib/dropbox.php @@ -208,7 +208,7 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common { if (isset(self::$tempFiles[$tmpFile])) { $handle = fopen($tmpFile, 'r'); try { - $response = $this->dropbox->putFile(self::$tempFiles[$tmpFile], $handle); + $this->dropbox->putFile(self::$tempFiles[$tmpFile], $handle); unlink($tmpFile); } catch (Exception $exception) { diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index 41b560ae84e..2ad85d09d5f 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -178,7 +178,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { if ($collection == '/' || $collection == '\.' || $collection == '.') { $uri = 'https://docs.google.com/feeds/default/private/full'; // Get parent content link - } else if ($dom = $this->getResource(basename($dir))) { + } else if ($dom = $this->getResource(basename($collection))) { $uri = $dom->getElementsByTagName('content')->item(0)->getAttribute('src'); } if (isset($uri)) { @@ -341,7 +341,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { break; } } - $title = basename($path); + $title = basename($path2); // Construct post data $postData = '<?xml version="1.0" encoding="UTF-8"?>'; $postData .= '<entry xmlns="http://www.w3.org/2005/Atom" xmlns:docs="http://schemas.google.com/docs/2007" xmlns:gd="http://schemas.google.com/g/2005" gd:etag='.$etag.'>'; @@ -352,13 +352,13 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } else { // Move to different collection if ($collectionEntry = $this->getResource($collection)) { - $feedUri = $colelctionEntry->getElementsByTagName('content')->item(0)->getAttribute('src'); + $feedUri = $collectionEntry->getElementsByTagName('content')->item(0)->getAttribute('src'); // Construct post data $postData = '<?xml version="1.0" encoding="UTF-8"?>'; $postData .= '<entry xmlns="http://www.w3.org/2005/Atom">'; $postData .= '<id>'.$entry->getElementsByTagName('id')->item(0).'</id>'; $postData .= '</entry>'; - $this->sendRequest($uri, 'POST', $postData); + $this->sendRequest($feedUri, 'POST', $postData); return true; } } @@ -424,7 +424,6 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } } if (!isset($uploadUri) && $entry) { - $etag = $entry->getAttribute('gd:etag'); $links = $entry->getElementsByTagName('link'); foreach ($links as $link) { if ($link->getAttribute('rel') == 'http://schemas.google.com/g/2005#resumable-create-media') { diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 3d13518f57b..84d64b65193 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -77,16 +77,11 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ $path=$this->cleanPath($path); try{ $response=$this->client->propfind($path, array(),1); - $stripLength=strlen($this->root)+strlen($path); $id=md5('webdav'.$this->root.$path); OC_FakeDirStream::$dirs[$id]=array(); - $skip = true; - foreach($response as $file=>$data){ - // Skip the first file, because it is the current directory - if ($skip) { - $skip = false; - continue; - } + $files=array_keys($response); + array_shift($files);//the first entry is the current directory + foreach($files as $file){ $file = urldecode(basename($file)); OC_FakeDirStream::$dirs[$id][]=$file; } @@ -120,7 +115,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ public function file_exists($path){ $path=$this->cleanPath($path); try{ - $response=$this->client->propfind($path, array('{DAV:}resourcetype')); + $this->client->propfind($path, array('{DAV:}resourcetype')); return true;//no 404 exception }catch(Exception $e){ return false; @@ -201,7 +196,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ $mtime=time(); } $path=$this->cleanPath($path); - $this->client->proppatch($path, array('{DAV:}lastmodified' => $mtime,)); + $this->client->proppatch($path, array('{DAV:}lastmodified' => $mtime)); } public function getFile($path,$target){ diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php index b75bb5c50f5..f3f6541a8d4 100644 --- a/lib/connector/sabre/directory.php +++ b/lib/connector/sabre/directory.php @@ -146,7 +146,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa * @return array */ public function getQuotaInfo() { - $rootInfo=OC_FileCache::get(''); + $rootInfo=OC_FileCache_Cached::get(''); return array( $rootInfo['size'], OC_Filesystem::free_space() |