| | |
| | | $success = false; |
| | | $TARGET = $RCMAIL->get_address_book($target); |
| | | |
| | | if ($TARGET && $TARGET->ready && !$TARGET->readonly) |
| | | $success = $TARGET->insert($CONTACTS->search($CONTACTS->primary_key, $cid), true); |
| | | if ($TARGET && $TARGET->ready && !$TARGET->readonly) { |
| | | $plugin = $RCMAIL->plugins->exec_hook('create_contact', array('record' => $CONTACTS->search($CONTACTS->primary_key, $cid), 'source' => $target)); |
| | | $a_record = $plugin['record']; |
| | | |
| | | if (!$plugin['abort']) |
| | | $success = $TARGET->insert($CONTACTS->search($a_record, true); |
| | | } |
| | | |
| | | if (empty($success)) |
| | | $OUTPUT->show_message('copyerror', 'error'); |
| | |
| | | // send response |
| | | $OUTPUT->send(); |
| | | |
| | | ?> |
| | | ?> |