thomascube
2011-07-23 04310ee1bf2448ebd04b4b8af50f1b97fea1b598
Better message if copying was rejected due to existing entries

1 files modified
6 ■■■■ changed files
program/steps/addressbook/copy.inc 6 ●●●● patch | view | raw | blame | history
program/steps/addressbook/copy.inc
@@ -29,6 +29,7 @@
$target_group = get_input_value('_togid', RCUBE_INPUT_POST);
$success = 0;
$errormsg = 'copyerror';
$maxnum  = $RCMAIL->config->get('max_group_members', 0);
foreach ($cids as $source => $cid)
@@ -78,6 +79,7 @@
        else {
            $record = $result->first();
            $ids[] = $record['ID'];
            $errormsg = 'contactexists';
        }
    }
@@ -101,11 +103,13 @@
        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));