summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-07-24 10:14:13 +0000
committeralecpl <alec@alec.pl>2011-07-24 10:14:13 +0000
commitec4b594c240bbdd4306f1d2b336f25ef6ee321c1 (patch)
tree6456bee62d4790485340c558f795b8b60aa87007
parent24f812dc9c77106c68497a9a7c7cab5c1dfe7565 (diff)
- DOn't generate contact name here, it's not required
-rw-r--r--program/steps/addressbook/func.inc2
-rw-r--r--program/steps/addressbook/save.inc7
2 files changed, 2 insertions, 7 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index 270f70f9f..f372c1c33 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -414,7 +414,7 @@ function rcmail_contact_form($form, $record, $attrib = null)
if ($section == 'head') {
$content = '';
- // unset display name if it is composed from name parts (same composition function as in save.inc)
+ // unset display name if it is composed from name parts
if ($record['name'] == rcube_addressbook::compose_display_name(array('name' => '') + (array)$record))
unset($record['name']);
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index a3fdde9f6..a8dd38f27 100644
--- a/program/steps/addressbook/save.inc
+++ b/program/steps/addressbook/save.inc
@@ -136,11 +136,6 @@ foreach ($GLOBALS['CONTACT_COLTYPES'] as $col => $colprop) {
}
}
-// let a dedicated function or a plugin compose the full name if empty
-if (empty($a_record['name'])) {
- $a_record['name'] = rcube_addressbook::compose_display_name($a_record);
-}
-
// do input checks (delegated to $CONTACTS instance)
if (!$CONTACTS->validate($a_record)) {
@@ -221,7 +216,7 @@ else {
// show notice if existing contacts with same e-mail are found
$existing = false;
foreach ($CONTACTS->get_col_values('email', $a_record, true) as $email) {
- if (($res = $CONTACTS->search('email', $email, false, false)) && $res->count) {
+ if (($res = $CONTACTS->search('email', $email, false, false, true)) && $res->count) {
$OUTPUT->show_message('contactexists', 'notice', null, false);
break;
}