| +-----------------------------------------------------------------------+ */ // only process ajax requests if (!$OUTPUT->ajax_call) return; // move messages if (!empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) { $target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true); foreach (rcmail_get_uids() as $mbox => $uids) { $copied += (int)$RCMAIL->storage->copy_message($uids, $target, $mbox); } if (!$copied) { // send error message rcmail_display_server_error('errorcopying'); $OUTPUT->send(); exit; } else { $OUTPUT->show_message('messagecopied', 'confirmation'); } rcmail_send_unread_count($target, true); $OUTPUT->command('set_quota', rcmail_quota_content()); } // unknown action or missing query param else { $OUTPUT->show_message('internalerror', 'error'); } // send response $OUTPUT->send();