aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CardDAV
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-02-15 18:35:40 +0000
committerMario <mario@mariovavti.com>2021-02-15 18:35:40 +0000
commit0cd4c3410121b9b584dc1b108e555832843b2576 (patch)
treeadcac187c383120a255396d19a010f359c58e614 /vendor/sabre/dav/lib/CardDAV
parent02401ea9fd5d53f590305c0f9834685cda58723d (diff)
downloadvolse-hubzilla-0cd4c3410121b9b584dc1b108e555832843b2576.tar.gz
volse-hubzilla-0cd4c3410121b9b584dc1b108e555832843b2576.tar.bz2
volse-hubzilla-0cd4c3410121b9b584dc1b108e555832843b2576.zip
compser update sabre/dav /vobject
Diffstat (limited to 'vendor/sabre/dav/lib/CardDAV')
-rw-r--r--vendor/sabre/dav/lib/CardDAV/Backend/PDO.php3
-rw-r--r--vendor/sabre/dav/lib/CardDAV/Plugin.php21
-rw-r--r--vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php1
3 files changed, 16 insertions, 9 deletions
diff --git a/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php b/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php
index a33de48de..966d7ba09 100644
--- a/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php
+++ b/vendor/sabre/dav/lib/CardDAV/Backend/PDO.php
@@ -6,6 +6,7 @@ namespace Sabre\CardDAV\Backend;
use Sabre\CardDAV;
use Sabre\DAV;
+use Sabre\DAV\PropPatch;
/**
* PDO CardDAV backend.
@@ -93,7 +94,7 @@ class PDO extends AbstractBackend implements SyncSupport
*
* @param string $addressBookId
*/
- public function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch)
+ public function updateAddressBook($addressBookId, PropPatch $propPatch)
{
$supportedProperties = [
'{DAV:}displayname',
diff --git a/vendor/sabre/dav/lib/CardDAV/Plugin.php b/vendor/sabre/dav/lib/CardDAV/Plugin.php
index 09d1f593d..c2d31d9df 100644
--- a/vendor/sabre/dav/lib/CardDAV/Plugin.php
+++ b/vendor/sabre/dav/lib/CardDAV/Plugin.php
@@ -587,14 +587,21 @@ class Plugin extends DAV\ServerPlugin
foreach ($vProperties as $vProperty) {
// If we got all the way here, we'll need to validate the
// text-match filter.
- $success = DAV\StringUtil::textMatch($vProperty[$filter['name']]->getValue(), $filter['text-match']['value'], $filter['text-match']['collation'], $filter['text-match']['match-type']);
+ if (isset($vProperty[$filter['name']])) {
+ $success = DAV\StringUtil::textMatch(
+ $vProperty[$filter['name']]->getValue(),
+ $filter['text-match']['value'],
+ $filter['text-match']['collation'],
+ $filter['text-match']['match-type']
+ );
+ if ($filter['text-match']['negate-condition']) {
+ $success = !$success;
+ }
+ }
if ($success) {
break;
}
}
- if ($filter['text-match']['negate-condition']) {
- $success = !$success;
- }
} // else
// There are two conditions where we can already determine whether
@@ -628,15 +635,15 @@ class Plugin extends DAV\ServerPlugin
$success = false;
foreach ($texts as $haystack) {
$success = DAV\StringUtil::textMatch($haystack, $filter['value'], $filter['collation'], $filter['match-type']);
+ if ($filter['negate-condition']) {
+ $success = !$success;
+ }
// Breaking on the first match
if ($success) {
break;
}
}
- if ($filter['negate-condition']) {
- $success = !$success;
- }
if ($success && 'anyof' === $test) {
return true;
diff --git a/vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php b/vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php
index d3651ae61..e1096fe28 100644
--- a/vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php
+++ b/vendor/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php
@@ -146,7 +146,6 @@ class AddressBookQueryReport implements XmlDeserializable
}
break;
case '{'.Plugin::NS_CARDDAV.'}filter':
-
if (!is_null($newProps['filters'])) {
throw new BadRequest('You can only include 1 {'.Plugin::NS_CARDDAV.'}filter element');
}