summaryrefslogtreecommitdiff
path: root/plugins/kolab_addressbook
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2015-02-24 10:13:38 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2015-02-24 10:13:38 (GMT)
commit055c5aff1327e503e8c82663ded21ea1666c72b4 (patch)
tree5896f49302cf68ab95f56e579c9d7493c67e4cc4 /plugins/kolab_addressbook
parent0e4bac5227be2c72407158dcaff3d5b694cb4246 (diff)
downloadroundcubemail-plugins-kolab-055c5aff1327e503e8c82663ded21ea1666c72b4.tar.gz
Support contacts without email address and name, but organization (#3082)
Diffstat (limited to 'plugins/kolab_addressbook')
-rw-r--r--plugins/kolab_addressbook/lib/rcube_kolab_contacts.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php b/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php
index 1443e86..1b3ea01 100644
--- a/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php
+++ b/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php
@@ -1002,9 +1002,11 @@ class rcube_kolab_contacts extends rcube_addressbook
// validate e-mail addresses
$valid = parent::validate($save_data);
- // require at least one e-mail address (syntax check is already done)
+ // require at least one e-mail address if there's no name
+ // (syntax check is already done)
if ($valid) {
if (!strlen($save_data['name'])
+ && !strlen($save_data['organization'])
&& !array_filter($this->get_col_values('email', $save_data, true))
) {
$this->set_error('warning', 'kolab_addressbook.noemailnamewarning');