summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-04-24 15:28:45 +0200
committerAleksander Machniak <alec@alec.pl>2014-04-24 15:29:47 +0200
commit115ba30dcd5efce3cd2647847bcc52d5324fcead (patch)
tree4dea43be6b4c6688e7174381b68a01cc819e9d04 /program
parente9651852654933b2c35fe5122609de17b9cb9e8c (diff)
Fix possibly wrong error message when contact with the same email exists on move/copy
Diffstat (limited to 'program')
-rw-r--r--program/steps/addressbook/copy.inc6
-rw-r--r--program/steps/addressbook/move.inc6
2 files changed, 6 insertions, 6 deletions
diff --git a/program/steps/addressbook/copy.inc b/program/steps/addressbook/copy.inc
index 9114cb1fd..e4e276591 100644
--- a/program/steps/addressbook/copy.inc
+++ b/program/steps/addressbook/copy.inc
@@ -88,9 +88,9 @@ foreach ($cids as $source => $cid) {
}
}
else {
- $record = $result->first();
- $ids[] = $record['ID'];
- $errormsg = empty($a_record['email']) ? 'contactnameexists' : 'contactexists';
+ $record = $result->first();
+ $ids[] = $record['ID'];
+ $errormsg = empty($email) ? 'contactnameexists' : 'contactexists';
}
}
diff --git a/program/steps/addressbook/move.inc b/program/steps/addressbook/move.inc
index 6a70e7bda..7a730af77 100644
--- a/program/steps/addressbook/move.inc
+++ b/program/steps/addressbook/move.inc
@@ -97,9 +97,9 @@ foreach ($cids as $source => $source_cids) {
}
}
else {
- $record = $result->first();
- $ids[] = $record['ID'];
- $errormsg = empty($a_record['email']) ? 'contactnameexists' : 'contactexists';
+ $record = $result->first();
+ $ids[] = $record['ID'];
+ $errormsg = empty($email) ? 'contactnameexists' : 'contactexists';
}
}