summaryrefslogtreecommitdiff
path: root/plugins/libkolab
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2015-02-24 17:51:00 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2015-02-24 17:51:00 (GMT)
commitc0129f7768f5ff77e5bb227fe65d2a8bd07d8e63 (patch)
treed8744a8d803c84d3a99d7ec018753d0af0aa5307 /plugins/libkolab
parentc1b6803ae2afec3d06447c2413fd06298431e3b9 (diff)
downloadroundcubemail-plugins-kolab-c0129f7768f5ff77e5bb227fe65d2a8bd07d8e63.tar.gz
Use 'organization' field for sorting if display name is not set (#3172)
Diffstat (limited to 'plugins/libkolab')
-rw-r--r--plugins/libkolab/lib/kolab_storage_cache_contact.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/libkolab/lib/kolab_storage_cache_contact.php b/plugins/libkolab/lib/kolab_storage_cache_contact.php
index 9666a39..29276ec 100644
--- a/plugins/libkolab/lib/kolab_storage_cache_contact.php
+++ b/plugins/libkolab/lib/kolab_storage_cache_contact.php
@@ -54,6 +54,11 @@ class kolab_storage_cache_contact extends kolab_storage_cache
$sql_data['email'] = '';
}
+ // use organization if name is empty
+ if (empty($sql_data['name']) && !empty($object['organization'])) {
+ $sql_data['name'] = rcube_charset::clean($object['organization']);
+ }
+
return $sql_data;
}
} \ No newline at end of file