Skip to content

Commit

Permalink
[jan] Export composite attributes to vCard too.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed May 29, 2014
1 parent e284e4e commit 089475c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions turba/docs/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
v4.2.0-git
----------

[jan] Export composite attributes to vCard too.


------------
Expand Down
4 changes: 3 additions & 1 deletion turba/lib/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,7 @@ public function tovCard(Turba_Object $object, $version = '2.1',
global $injector;

$hash = $object->getAttributes();
$attributes = array_keys($this->map);
$vcard = new Horde_Icalendar_Vcard($version);
$formattedname = false;
$charset = ($version == '2.1')
Expand All @@ -1129,7 +1130,8 @@ public function tovCard(Turba_Object $object, $version = '2.1',
$hooks = $injector->getInstance('Horde_Core_Hooks');
$decode_hook = $hooks->hookExists('decode_attribute', 'turba');

foreach ($hash as $key => $val) {
foreach ($attributes as $key) {
$val = $object->getValue($key);
if ($skipEmpty && !strlen($val)) {
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions turba/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</stability>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
*
* [jan] Export composite attributes to vCard too.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -1838,7 +1838,7 @@
<date>2014-05-05</date>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
*
* [jan] Export composite attributes to vCard too.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit 089475c

Please sign in to comment.