diff options
author | Mario <mario@mariovavti.com> | 2018-03-09 11:12:18 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-03-09 11:12:18 +0100 |
commit | 4baf5eab16d809977a44e7911ddcab0ff8383897 (patch) | |
tree | 393f618c4cfc20f53264ecd8a26a08de0823d35d /vendor/sabre/vobject/lib | |
parent | 577da0eb9eb1f90a4cf7a70cfb3582cfb49007ac (diff) | |
parent | 7361af85b5488fc8bd1744389a3a332dc74276b0 (diff) | |
download | volse-hubzilla-3.2.tar.gz volse-hubzilla-3.2.tar.bz2 volse-hubzilla-3.2.zip |
Merge branch '3.2RC'3.2
Diffstat (limited to 'vendor/sabre/vobject/lib')
-rw-r--r-- | vendor/sabre/vobject/lib/Component.php | 17 | ||||
-rw-r--r-- | vendor/sabre/vobject/lib/Component/VCard.php | 5 | ||||
-rw-r--r-- | vendor/sabre/vobject/lib/Version.php | 2 | ||||
-rw-r--r-- | vendor/sabre/vobject/lib/timezonedata/exchangezones.php | 1 |
4 files changed, 23 insertions, 2 deletions
diff --git a/vendor/sabre/vobject/lib/Component.php b/vendor/sabre/vobject/lib/Component.php index 9a10ed3f8..ac87a10ec 100644 --- a/vendor/sabre/vobject/lib/Component.php +++ b/vendor/sabre/vobject/lib/Component.php @@ -662,8 +662,23 @@ class Component extends Node { break; case '?' : if (isset($propertyCounters[$propName]) && $propertyCounters[$propName] > 1) { + $level = 3; + + // We try to repair the same property appearing multiple times with the exact same value + // by removing the duplicates and keeping only one property + if ($options & self::REPAIR) { + $properties = array_unique($this->select($propName), SORT_REGULAR); + + if (count($properties) === 1) { + $this->remove($propName); + $this->add($properties[0]); + + $level = 1; + } + } + $messages[] = [ - 'level' => 3, + 'level' => $level, 'message' => $propName . ' MUST NOT appear more than once in a ' . $this->name . ' component', 'node' => $this, ]; diff --git a/vendor/sabre/vobject/lib/Component/VCard.php b/vendor/sabre/vobject/lib/Component/VCard.php index 4f620de10..bca623d5e 100644 --- a/vendor/sabre/vobject/lib/Component/VCard.php +++ b/vendor/sabre/vobject/lib/Component/VCard.php @@ -295,6 +295,11 @@ class VCard extends VObject\Document { } elseif (isset($this->ORG)) { $this->FN = (string)$this->ORG; $repaired = true; + + // Otherwise, the EMAIL property may work + } elseif (isset($this->EMAIL)) { + $this->FN = (string)$this->EMAIL; + $repaired = true; } } diff --git a/vendor/sabre/vobject/lib/Version.php b/vendor/sabre/vobject/lib/Version.php index 346e2044d..24c51a604 100644 --- a/vendor/sabre/vobject/lib/Version.php +++ b/vendor/sabre/vobject/lib/Version.php @@ -14,6 +14,6 @@ class Version { /** * Full version number. */ - const VERSION = '4.1.2'; + const VERSION = '4.1.3'; } diff --git a/vendor/sabre/vobject/lib/timezonedata/exchangezones.php b/vendor/sabre/vobject/lib/timezonedata/exchangezones.php index 38138354a..edba5b473 100644 --- a/vendor/sabre/vobject/lib/timezonedata/exchangezones.php +++ b/vendor/sabre/vobject/lib/timezonedata/exchangezones.php @@ -85,6 +85,7 @@ return [ 'Saskatchewan' => 'America/Edmonton', 'Arizona' => 'America/Phoenix', 'Mountain Time (US & Canada)' => 'America/Denver', // Best guess + 'Pacific Time (US & Canada)' => 'America/Los_Angeles', // Best guess 'Pacific Time (US & Canada); Tijuana' => 'America/Los_Angeles', // Best guess 'Alaska' => 'America/Anchorage', 'Hawaii' => 'Pacific/Honolulu', |