function uc_order_comment_save in Ubercart 5
Same name and namespace in other branches
- 8.4 uc_order/uc_order.module \uc_order_comment_save()
- 6.2 uc_order/uc_order.module \uc_order_comment_save()
- 7.3 uc_order/uc_order.module \uc_order_comment_save()
Insert a comment, $type being either 'order' or 'admin'
27 calls to uc_order_comment_save()
- test_gateway_charge in payment/
uc_payment/ test_gateway.module - uc_2checkout_complete in payment/
uc_2checkout/ uc_2checkout.module - uc_authorizenet_arb_cancel in payment/
uc_authorizenet/ uc_authorizenet.module - Cancels an ARB subscription.
- uc_authorizenet_arb_create in payment/
uc_authorizenet/ uc_authorizenet.module - Sends an ARB Create request via the XML API.
- uc_authorizenet_arb_update in payment/
uc_authorizenet/ uc_authorizenet.module - Updates an ARB subscription; for simplicity's sake, payment schedule information cannot be updated at this time.
File
- uc_order/
uc_order.module, line 2649
Code
function uc_order_comment_save($order_id, $uid, $message, $type = 'admin', $status = 'pending', $notify = FALSE) {
if ($type == 'admin') {
db_query("INSERT INTO {uc_order_admin_comments} (order_id, uid, message, created) VALUES (%d, %d, '%s', %d)", $order_id, $uid, $message, time());
}
elseif ($type == 'order') {
db_query("INSERT INTO {uc_order_comments} (order_id, uid, message, order_status, notified, created) VALUES (%d, %d, '%s', '%s', %d, %d)", $order_id, $uid, $message, $status, $notify ? 1 : 0, time());
}
}