function uc_order_log in Ubercart 7.3
Same name and namespace in other branches
- 5 uc_order/uc_order.module \uc_order_log()
- 6.2 uc_order/uc_order.admin.inc \uc_order_log()
Displays a log of changes made to an order.
1 string reference to 'uc_order_log'
- uc_order_menu in uc_order/
uc_order.module - Implements hook_menu().
File
- uc_order/
uc_order.admin.inc, line 1288 - Order administration menu items.
Code
function uc_order_log($order) {
$result = db_query("SELECT * FROM {uc_order_log} WHERE order_id = :id ORDER BY order_log_id DESC", array(
':id' => $order->order_id,
));
$header = array(
t('Time'),
t('User'),
t('Changes'),
);
$rows = array();
foreach ($result as $change) {
$rows[] = array(
format_date($change->created, 'short'),
theme('uc_uid', array(
'uid' => $change->uid,
)),
$change->changes,
);
}
$build['log'] = array(
'#theme' => 'table',
'#header' => $header,
'#rows' => $rows,
'#empty' => t('No changes have been logged for this order.'),
);
return $build;
}