summaryrefslogtreecommitdiff
path: root/program/include/rcube_vcard.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-02-14 20:46:48 +0000
committerthomascube <thomas@roundcube.net>2011-02-14 20:46:48 +0000
commit3e2637351da9559a4aa420004ac90e9fe30477ef (patch)
treeca7f99df5bba9fc2bf63ab3bb14566dfffa3b607 /program/include/rcube_vcard.php
parentfc2d3de7691a9b1d083eed435c2c327c2b8edbaa (diff)
Fulltext search over contact fields. Attention: DATABASE SCHEMA CHANGED\!
Diffstat (limited to 'program/include/rcube_vcard.php')
-rw-r--r--program/include/rcube_vcard.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/program/include/rcube_vcard.php b/program/include/rcube_vcard.php
index 82538379f..40544be90 100644
--- a/program/include/rcube_vcard.php
+++ b/program/include/rcube_vcard.php
@@ -135,11 +135,15 @@ class rcube_vcard
$typemap = $this->typemap;
// copy name fields to output array
- foreach (array('firstname','surname','middlename','nickname','organization') as $col)
- $out[$col] = $this->$col;
+ foreach (array('firstname','surname','middlename','nickname','organization') as $col) {
+ if (strlen($this->$col))
+ $out[$col] = $this->$col;
+ }
- $out['prefix'] = $this->raw['N'][0][3];
- $out['suffix'] = $this->raw['N'][0][4];
+ if ($this->raw['N'][0][3])
+ $out['prefix'] = $this->raw['N'][0][3];
+ if ($this->raw['N'][0][4])
+ $out['suffix'] = $this->raw['N'][0][4];
// convert from raw vcard data into associative data for Roundcube
foreach (array_flip($this->fieldmap) as $tag => $col) {