diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-14 20:46:48 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-14 20:46:48 +0000 |
| commit | 1e1ad9ee81069a18c3bbe0101f405491d977b1bf (patch) | |
| tree | 32dc1f66b2575ba9642696e5fbc4b311ade728cf /roundcubemail/program/include/rcube_vcard.php | |
| parent | 2e91bb700b0ea556d4780a4d80703f3ce8473391 (diff) | |
Fulltext search over contact fields. Attention: DATABASE SCHEMA CHANGED\!
git-svn-id: https://svn.roundcube.net/trunk@4541 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_vcard.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_vcard.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/roundcubemail/program/include/rcube_vcard.php b/roundcubemail/program/include/rcube_vcard.php index 82538379f..40544be90 100644 --- a/roundcubemail/program/include/rcube_vcard.php +++ b/roundcubemail/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) { |
