[Pkg-owncloud-commits] [php-sabre-vobject] 216/341: Support GENDER serialization to xCard.
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 13:35:49 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit 4522e60a5b880881f835b67369deb2e5880de839
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date: Mon Jan 26 17:41:57 2015 +0100
Support GENDER serialization to xCard.
---
lib/Property/Text.php | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lib/Property/Text.php b/lib/Property/Text.php
index 004b370..56b3db0 100644
--- a/lib/Property/Text.php
+++ b/lib/Property/Text.php
@@ -325,6 +325,17 @@ class Text extends Property {
$writer->writeElement($name, $value);
}
+ } elseif ($this->name === 'GENDER') {
+
+ $mapping = [
+ 'sex' => !empty($values[0]) ? $values[0] : null,
+ 'text' => !empty($values[1]) ? $values[1] : null,
+ ];
+
+ foreach ($mapping as $name => $value) {
+ $writer->writeElement($name, $value);
+ }
+
} else {
parent::xmlSerializeValue($writer);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git
More information about the Pkg-owncloud-commits
mailing list