summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-07-23 09:07:28 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-07-23 09:07:28 +0000
commit52038f19a6081623f35ac727729f09427f6f3400 (patch)
tree6aacf8bd05338dbb59e373f9d3f28510331f8b10
parent1b70aa3ad06c788aacd2a0d1461a6d2f497c96c3 (diff)
Better message if copying was rejected due to existing entries
git-svn-id: https://svn.roundcube.net/trunk@4956 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/steps/addressbook/copy.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/addressbook/copy.inc b/roundcubemail/program/steps/addressbook/copy.inc
index 1e4e753b6..5bfe5b400 100644
--- a/roundcubemail/program/steps/addressbook/copy.inc
+++ b/roundcubemail/program/steps/addressbook/copy.inc
@@ -28,8 +28,9 @@ $cids = rcmail_get_cids();
$target = get_input_value('_to', RCUBE_INPUT_POST);
$target_group = get_input_value('_togid', RCUBE_INPUT_POST);
-$success = 0;
-$maxnum = $RCMAIL->config->get('max_group_members', 0);
+$success = 0;
+$errormsg = 'copyerror';
+$maxnum = $RCMAIL->config->get('max_group_members', 0);
foreach ($cids as $source => $cid)
{
@@ -78,6 +79,7 @@ foreach ($cids as $source => $cid)
else {
$record = $result->first();
$ids[] = $record['ID'];
+ $errormsg = 'contactexists';
}
}
@@ -101,11 +103,13 @@ foreach ($cids as $source => $cid)
else if ($plugin['result']) {
$success = $plugin['result'];
}
+
+ $errormsg = $plugin['message'] ? $plugin['message'] : 'copyerror';
}
}
if ($success == 0)
- $OUTPUT->show_message('copyerror', 'error');
+ $OUTPUT->show_message($errormsg, 'error');
else
$OUTPUT->show_message('copysuccess', 'notice', array('nr' => $success));