function uc_weight_sort in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_store/uc_store.module \uc_weight_sort()
- 7.3 uc_store/uc_store.module \uc_weight_sort()
16 string references to 'uc_weight_sort'
- uc_cart_cart_pane_list in uc_cart/
uc_cart.module - uc_checkout_pane_payment in payment/
uc_payment/ uc_payment_checkout_pane.inc - uc_order_load in uc_order/
uc_order.module - Load an order from the database.
- uc_order_load_invoice in uc_order/
uc_order.module - uc_order_load_line_items in uc_order/
uc_order.module - Return an array containing an order's line items ordered by weight. if ($stored) { $order should be an order ID. }
File
- uc_store/
uc_store.module, line 2494 - Contains global Ubercart functions and store administration functionality.
Code
function uc_weight_sort($a, $b) {
if ($a['weight'] == $b['weight']) {
return 0;
}
return $a['weight'] > $b['weight'] ? 1 : -1;
}